A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by JustInvoke, Mar 14, 2015.
It's the VehicleDebug script on the root transform.
Oh thank you! Couldn't find anything referencing it to it.
Also you can check out the thread for my new multiplayer game using RVP 2 here
Okay, well I disabled the components, so the R and Z keys don't work (which is what I want) but the X key still resets the session, even with the VehicleDebug removed
EDIT: Found it just after, was looking around the wrong areas, because the hotkey to quit the session is X, duh
Version 2.08 has been released with the following changes:
New “Car Damage” and “Hover Car Damage” prefabs to serve as simpler examples of damageable vehicles.
Tires on the mobile muscle car prefab have been given a simpler material that doesn't deform, since the original material doesn't show up on certain platforms.
Motor – Audio's target pitch is set to zero when ignition is false.
GasMotor – Output torque/RPM and feedback RPM are set to zero when ignition is false. Moved setting of targetDrive.curve to outside of ignition branch.
Wheel – Vehicle's name is part of detached wheel's name. New “forward slip dependence” and “sideways slip dependence” variables for finer tuning of friction behavior. The effect of these variables is most noticeable when the slip dependence is set to Independent. Tweaking them can help to reduce jitter with lower fixed timesteps.
HoverWheel – Vehicle's name is part of detached wheel's name.
VehicleDamage – Refactoring of damage system and new ApplyDamage() function. This function is useful for damaging vehicles without relying on collisions, such as with explosions. The constructors are documented in the VehicleDamage section of the manual.
Suspension – “Detached compression” variable is limited between 0 and 1.
I'll be busy throughout the holidays, so this will be the last update for the year unless a serious bug is discovered.
I'm trying to implement an on/off ignition system for the cars. It works, except if you're holding down the accelerator when you turn the ignition off the vehicle still has acceleration controls. This doesn't happen if you disable ignition when the accelerator isn't being pressed. Any ideas?
Are you using the latest version? I just tested this by setting the ignition to false through script while accelerating, and it did not accelerate further. The brakes still work as they should.
Seems Unity 5.3 broke it...
New project, Imported from asset store...opened C# demo, play and:
I just installed the Unity 5.3 update and now my cars all act like they are in a tornado. They just get blown around uncontrollably.
I even created a fresh project and imported a fresh instance of Vehicle Physics 2.08 and tried the test track. All cars seem to affected.They just twirl around on their noses...
Anyone else having this issue? Thoughts?
Yup - that's the problem!
Just should waiting for author update it on Unity 5.3.
This is because of changes to the physics, where the inertia tensor isn't tied to the center of mass anymore. I'm still trying to understand how it works since I haven't worked with the inertia tensor before.
After some tests, it seems that setting the inertia tensor to equal itself fixes the problem. Try adding this after line 367 in the VehicleParent script, where the center of mass is set. The line count obviously varies if you've modified it, and it's in the SetCenterOfMass() method.
rb.inertiaTensor = rb.inertiaTensor;
This strange solution makes me wary of what else might be broken, since it doesn't seem like intended behavior for the act of simply setting the variable to cause it behave so differently. I'm going to file a bug report and see what Unity has to say, I don't want to rush out a hotfix just yet.
Edit: It also appears there is severe lag when spawning multiple instances of the muscle car and colliding them into each other. It even happens when I disable the collisions between them and they pass through each other, so I know it's not related to the damage script. The profiler indicates that it's related to the wheel script for some reason.
None of this was a problem in 5.2, I really don't know what to do about this.
I've submitted an update fixing all of the warnings in Unity 5.3 as well as the issue in the video posted earlier.
After submitting a bug report regarding the inertia tensor, the gist of the response I received is that it's not a bug, but a feature, even though setting the inertia tensor to equal itself throws a warning from the JS version since setting a variable to equal itself is so kludgy that even the compiler wonders if it's a mistake. Whatever it takes to make it work, I suppose. (In the JS version I declared a temporary variable to avoid the warning.)
I still don't know why it lags so much when damageable vehicles collide, and it turns out that the damage script is the source of the problem, even though it was fine in Unity 5.2. I still made a minor optimization to the damage script and the wheel script, but it's not helping much.
Version 2.08.1 has been released with the following changes:
NOTE: The “legacy torque multiplier” variable of the Transmission script is obsolete and will be removed in a future update. The PowNatural() function of the F script will also be removed.
Inverted spring target position on trunk of muscle car due to changes to hinge joints in Unity 5.3.
VehicleParent – Set inertia tensor of rigidbody to be equal to itself due to decoupling of center of mass and inertia tensor in Unity 5.3.
VehicleMenu – Fixed implicit downcast warnings.
Wheel – Feedback RPM is set to zero when wheel is jammed or detached. Removed redundant IsChildOf() check from GetWheelContact(). Fixed bug where detached wheel’s tire material was not set correctly if “deform amount” is set to zero.
VehicleDamage – Slight refactoring to avoid redundant mesh vertex assignments.
GlobalControl – Level restarting uses new SceneManager class in Unity 5.3.
PerformanceStats – Level restarting uses new SceneManager class in Unity 5.3.
Motor – Refactored setting of particle emission rates for Unity 5.3.
TireMarkCreate – Refactored setting of particle emission rates for Unity 5.3.
Now this should be the last update of the year since I'm going to be very busy until part way into January.
@RandomationGames , may I ask if you're working on any games with these physics yourself?
No, but I am working a vertical slice of a kart racer with suspension calculations copied from RVP.
Anyone gotten any closer in syncing crashes over the network?
Also, @RandomationGames someone with a very substantial amount of subscribers did a gameplay of my game using RVP 2.0. At the moment it's still basic but I'm adding in a lot of things... I hope you don't mind me using some stock vehicles
It's great to see a game with my physics getting that kind of exposure.
As for syncing the damage over the network, have you tried the new ApplyDamage() function in the VehicleDamage script? You might be able to send collision info over the network, then use it to call the ApplyDamage() function on each user's device. You would have to comment out the part where damage is applied in OnCollisionEnter.
Also, I've got more info regarding the inertia tensor, and there is in fact a bug in the way it's set, but for now setting it to equal itself works fine.
Here is that prototype I showed before, I put it up on facebook and some how it's getting alot of players??
Currently getting over 3500 players per day and growing? so strange cause I really didn't post the link any where.
i am considering to buy your package, but i dont know if it is possible to achieve my needs.
I want to create a game familar to https://play.google.com/store/apps/details?id=com.rkgames.smashywanted , which is also for mobile. If you play the game, the car physics are very arcadish but still realistic. Especially when you drive half on the way and half on the grass.
I dont need any spring effects or other fancy stuff (as you see in smashy road wanted). But it requires to have up to 60 wheels on the screen.
I wonder if smashy road physics can be achieved with your package or if that your package is too overkill (or not suited) for this purpose?
I think my physics are overkill for this, and 60 vehicles is too much for mobile with my system unfortunately. You could do something much simpler with something like 1 raycast for each vehicle and applying some basic driving forces directly to the rigidbodies along with a low friction physic material, so they can just slide along the ground. Add some opposing force opposite of the local sideways velocity to keep vehicles driving straight, and some driving/braking force in the local forward direction.
Thanks for the answer. I meant 60 wheels = 15 vehicles. I know for a fact that they used edy's vehicle system for player and police but i can't reproduce it with his package.
The problem with simple rigidbody is that if you have soms height difference, like a sidewalk near the road, the rigidbody flies up if you ride over it. In real situation, this won't happen because of the wheels springs and damping.
Any idea how to solve this?
Tested 5.3.1...broke (atleast for Musle Car)
Constant Errors if you select The musle car, which kills FPS.
*other cars seem fine
(5.3.1)Seems the issue is related to the Particles on the car
Unity bug? maybe they need to recall 5.3.1 - seems like a big issue
But the import problem I think is a "critical" issue
Also won't import into 5.2.3
I'm currently wrapped up in moving state and Christmas plans, but I might get a chance to look at this one day next week with 5.3.1. I won't be able to work on any updates until sometime in January.
I had to make changes for Unity 5.3.0 to remove warnings, which unfortunately broke compatibility with 5.2 because of the new SceneManager class. In order to use RVP 2.08.1 you will have to either upgrade to Unity 5.3 or change the scene loading code to use Application.LoadLevel like before.
You could try spawning more chase cars in the Android demo for RVP and see how they perform on you target device. There is a link in the first post.
Why would you break compatibility for EVERY version but 5.3?
You do know we can't download previous versions?
Telling people to upgrade to an Unstable version is not a good solution when all you had to do was:
Time.timeScale = 1;
Time.fixedDeltaTime = initialFixedTime;
public void Restart()
Time.timeScale = 1;
Sorry, I forgot about platform depend compilation, I will look into adding it in the future.
You can download previous versions of Unity here:
lol, I was talking about previous versions of Randomation Vehicle Physics not unity.
The asset store doesn't have a way to pick a previous version of an asset, you can only download the last version you submitted.
Did you not know that?
I can fix it, but anyone that buys RVP and not on 5.3 is going to be pissed.
Fixed the code so it's platform independant.
Sent the project to RandomationGames for testing.
I know you can only download the latest version, but there is only so much I can do. I will take a look at platform dependent compilation when I have time, but I'm hesitant to clutter the code with duplicate but slightly different versions of methods/expressions for the sake of supporting multiple versions of Unity.
There is a way to make your versions of the product in the Asset Store require specific versions of Unity or older versions are downloaded. I know the ShaderForge guy does this. That's probably the way you want to go.
Also, Unity 5.3 is officially released so technically it's not "unstable" anymore. I haven't used it yet so I can't say whether it's unstable in use though.
I uploaded the latest version with 5.3, so the store page already says that it requires 5.3 or later to work. I still have to think about how I should go about this, even though I've done this before with new versions of Unity in the past and had no backlash. Supporting multiple versions might be too much for me right now.
I'm agree with you.
^same, I would prefer for the asset to be compatible with the latest Unity version. If you can't upgrade your Unity version then don't update your version of the asset. Just my opinion.
@RandomationGames did you design all the 3d models yourself? Or did you contract someone? Because I really like the design type of them since they are actually perfect for my game!
I made them, thanks. I figured a simple style was good for demonstrating the package instead of weighing it down with high poly models and large textures.
They are really good for performance and they work extremely well with the VehicleDamage script. I hope you don't mind me using some in my game, as I'm still working on building my own. Cheers.
I just bought this asset and like others, noticed the error flood with the muscle car.
So after some research into the issue, I installed Unity 3D patch 5.3.1p1 and can confirm it fixed the "Invalid AABB result" particle effect errors. I'm back in business now! Really liking this asset so far!
Download the 5.3.1p1 patch here:
Pretty much this, I just wanted to confirm that it is in fact a Unity problem and I cannot fix it. There is also discussion about it here.
I have been moving home during the past few days, but now my PC is set up again so I can resume work and reply to e-mails.
Okay, now this will probably be a really simple answer but I can't seem to find it.
What I'm looking for is where the value of the boost is stored, as I can't find it under the GasMotor script, or VP.
Edit: Found it, I was looking under the wrong class. It was in the Motor script rather than GasMotor
Hey! i have a question regarding the waypoint system. iam currently working on a leveleditor:
and i also want that users have to define the waypoints or even put a waypoint inside the track prefab (the road that you can around and connects automatically.)
i think the RVP waypoint system already works pretty good but is there a way to somehow let the waypoints connect automatically? so that i don't have to manually put in the next point?
@Der_Kevin I really, really like that level editor, and I'm willing to purchase one... Will that be on the asset store anytime soon?
I'm really battling to get the nitrous boost working 'effectively'. Ultimately I'd like my vehicle to go about 3 times it's speed when boosted, but no matter what values I try, the boost is always a very small amount.
My engine power is set to 1, I'm trying to set it to 3, but the engine just makes a 'turning over' sound and the vehicle goes even slower.
I've tried copying the sample data and boost power curve from the prefab vehicles, but it makes no difference.
Is there some formula for working out some good boost values?
Here is my engine in the inspector...
Any response to my question on Nitro? I really need to be able to increase my vehicles speed quite visibly when Nitro is used.
I'm sure this is not the "proper" way...but has the effect I was looking for.
I increase the power and friction on the wheels when the boost is held down, and restore the normal values otherwise
in my update loop
if (vp.groundedWheels == 4 && vp.boostButton)
float f = 15;
vp.engine.power = 1.25f;
_LFW.forwardFriction = f;
_LRW.forwardFriction = f;
_RFW.forwardFriction = f;
_RRW.forwardFriction = f;
_LFW.sidewaysFriction = f;
_LRW.sidewaysFriction = f;
_RFW.sidewaysFriction = f;
_RRW.sidewaysFriction = f;
vp.engine.power = 1;
_LFW.forwardFriction = _Front_FFriction;
_RFW.forwardFriction = _Front_FFriction;
_LRW.forwardFriction = _Rear_FFriction;
_RRW.forwardFriction = _Rear_FFriction;
_LFW.sidewaysFriction = _Front_SFriction;
_RFW.sidewaysFriction = _Front_SFriction;
_LRW.sidewaysFriction = _Rear_SFriction;
_RRW.sidewaysFriction = _Rear_SFriction;
Thanks @bocs I'll give that a try.
EDIT : It works really well, thanks for the idea
I'm using RVP 2.08.1 and Unity 5.3.1 f1 and sometimes the main camera spams this error in the console:
Any reply to this?
I have used this package for a long time but 5.3.2 has broke it i think, If i import into a new project and start the demo scene the cars are just crazy!
For instance when the car lands the right side will bounce up, some of the AI vehicles are just spinning out of control? Anyone else have this problem?
Did you install the latest version of the package, I know it fixed some issues in 5.3
Any ideas why the cars end up like this when I place them in a scene, the ground in the pic has a collider.
Have you got the TimeMaster and GlobalControl prefabs in your scene?