Search Unity

Randomation Vehicle Physics 2.0 - Now open source on GitHub!

Discussion in 'Assets and Asset Store' started by JustInvoke, Mar 14, 2015.

  1. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    Yes, but I think all assets in the complete projects category try to do this. I suppose if you e-mail me your invoice I can provide an external download of the project for future updates.

    Just set auto shift on the transmission to false. The VehicleParent script has two functions, PressUpShift() and PressDownShift() for sending shift input.

    ---------------------------

    On another note, I'm going to start setting some boundaries. Lately I've had a habit of repeatedly checking e-mails throughout the day and trying to provide support as soon as possible, but this has been starting to get in the way of non-RVP things too much. Because of this, I'm only going to check and reply to e-mails/forum posts in the first half of the day in my timezone (GMT -7 hours no daylight savings). I'm also going to stop providing technical support on weekends, but I'll still answer questions.

    RVP is a commitment and I can't risk getting burnt out, and I need to live up to the reviews. You can still expect replies within 24 hours.
     
    StephenL, CoderPro and Meltdown like this.
  2. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I had to resubmit update 2.03 because of some changes in Unity 5.1, so it's been pushed back by a few days.
     
    JuhaFH likes this.
  3. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    RVP 2.03 has been released with the following changes:
    • Improved performance for the VehicleDamage script plus new “Damage Factor” variable. Script execution order of VehicleDamage set to be after default time.
    • CameraControl has been modified to not follow the rotation of airborne vehicles as much.
    • Suspension – Suspension distance can be zero and target compression is forced to be 1 in play mode. New “Hard Contact Sensitivity” variable for changing how sensitive hard contacts are to the traveling velocity of the suspension.
    • Normals are no longer recalculated in TireMarkCreate.
    • Changes to torque output in GasMotor to allow vehicles to roll past their top speed and not slow down when the throttle is engaged.
    • MotorBoost power replaced with boost power curve allowing for more control over boost power based on the speed of vehicles.
    • New “Disable During Crash” variable in FlipControl disables flipping control when a vehicle crashes while airborne.
    • Changes to DetachablePart for Unity 5.1 compatibility where minBounce and maxBounce are replaced with bounciness for joints.
     
    Meltdown and StephenL like this.
  4. Deleted User

    Deleted User

    Guest

    Is it possible to let your vehicle physics run in an network game?
     
  5. zugsoft

    zugsoft

    Joined:
    Apr 23, 2014
    Posts:
    453
    Hello,

    Everything is possible :D , just need to send the opponents positions, and the physics will make the damage, collision....
     
  6. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I haven't tested it, but the first page has some posts claiming it's possible.
     
  7. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    G'day, I was just wondering (and it may be a silly question) but does this use WheelColliders?

    Cheers
     
  8. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    No
     
  9. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
  10. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    can any user confirm (just before I purchase I'm sold on this anyway) but does it have a steering wheel for the cars/system (so I can see an in car view with the steering wheel moving)

    also to expand on this has any / further plan for animated hands for a steering wheel ?

    cheers in advance
     
  11. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    Yes, you can see the steering wheel in the muscle car in the demo. I don't have any plans to expand into character animation.
     
  12. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    ok thanks for the info (still buying)
     
  13. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    Best purchase yet on the asset store! Keep it up
     
    Meltdown likes this.
  14. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    Thank you all.

    A customer pointed out to me that burnouts are possible even when the engine is damaged completely. I've fixed this but I'm not sure when the next update will be, so you can e-mail me your invoice number to receive the fixed script.
     
  15. MacluMan

    MacluMan

    Joined:
    Nov 25, 2013
    Posts:
    23
    I can not believe I did not include the motorcycle :(
     
  16. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I assume you mean that you're disappointed at the lack of a motorcycle. I still haven't got around to making them work.
     
  17. MacluMan

    MacluMan

    Joined:
    Nov 25, 2013
    Posts:
    23
    Excuse me, I thought you discarded bikes.

    One question, it is possible to keep the bike continued skidding,

    I tested the web player and I can not get the bike skidded hold while turning a curve as in this video, it's the kind of game I want to do.
     
  18. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    There is no bike in the demo, unless you're talking about the one for RVP 1.5 which is discontinued. I haven't been able to get bikes working properly in RVP 2.0.
     
  19. MacluMan

    MacluMan

    Joined:
    Nov 25, 2013
    Posts:
    23
    Yes, I refer to the old version

    but this could be achieved with the old version?
     
  20. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    It seems to drift fine for me, I'm not completely sure what kind of drifting behavior you want.

    We can discuss this further in the thread for the old version.
     
    MacluMan likes this.
  21. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    Hi there! Awesome work! Best package I've bought. I've noticed sometimes with the boost pressed, you cannot turn left, but you can turn right? Is this to do with the positive/negative buttons on the axis?

    And just another wee thing, what would be the best PhysicMaterial for the terrain?

    Awesome work! Love it
     
  22. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    Thanks, the input issue is a common problem with the way keyboards are wired. I don't remember the specifics, but most keyboards aren't meant to handle more than 2 or 3 key presses, aside from ctrl/alt/shift. Specialized gaming keyboards don't have this limitation.

    The best physic material is whatever you want it to be, but the default friction is 0.6. By default, tires don't react to physic material friction unless the surface is configured for it. The GroundSurfaceMaster script on the GlobalControl object contains variables for adjusting surfaces for tire interaction. More info can be found in the manual.
     
  23. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Modify the BasicInput script to use Input.GetKeyDown for keyboard inputs instead of Input Axis.
     
  24. DarkJoney

    DarkJoney

    Joined:
    Jan 31, 2013
    Posts:
    24
    Hey, when bikes will be avaliable again as in 1st version? I really like our demo, I think that I will get one for my game ;)
     
  25. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I don't know if they will ever be, but this week I'm going to have another go at trying to make them work.
     
  26. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    I'm kind of new to coding, but is there a way just to show the gear, speed, and maybe a digital (numbers) tachometer?
    Cheers
     
  27. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    This is base kit to you can code more function like you want. Don't request any thing that you need in your game, ok ?. Its mean the code of kit must be clean to other developer can develop from it. Stop request !
     
  28. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    Well I wasn't 'requesting' a piece of code, I was asking if anyone could help me modify some of the base code for my preferences
    @CoderPro
     
  29. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    The VehicleMenu script contains code referencing these variables. The tachomoter can be done by getting the RPM variable of the DriveForce on the engine.
     
  30. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    Version 2.04 has been released with the following changes:

    VehicleParent – New “engine” variable, burnouts can no longer be performed when engine is fully damaged, but only if the variable is set.

    Wheel – Added condition to see if shader on tires has deform properties before trying to apply deformation.

    Suspension – New variable “leaning force” to make suspension forces be applied along the local up-direction of the vehicle rather than the ground normal.

    VehicleBalance – Removed steer assist stuff.

    GlobalControl – The “damage mask” layermask has been adjusted to include objects on the “Detachable Part” layer. This somewhat fixes the issue of vehicles sometimes not damaging each other upon collision. Another culprit for vehicles not damaging each other can be the "collision ignore height" variable.

    The scene now has a bumpy terrain area past the figure 8 track.

    The changes to the suspension have improved the bike balancing a little bit and the prefab has been tweaked some more, but it still isn't ready to be advertised as a feature.

    There won't be any big new features like the damage for some time because I'll be in the process of moving to a different state over the next couple months, but I'll still provide support and bug fixes as needed.
     
  31. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    I has just test control vehicle on mobile devices using Accelerator control. But it very difficult to control car. I did config some other variables on editor, but it still very difficult to control. I hope you will improve accelerator control for mobile devices.
     
  32. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I may try improving them, but mobile development isn't my specialty so I'm not good with the nuances of accelerometer input.
     
  33. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Maybe you need add sensitivity for steering wheel and accelerator control :). Please play Asphalt 8, i don't known why they did make very easy control for user like that.
     
  34. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I know everyone wants to make a game like Asphalt 8, I'll probably check it out some time.

    Accelerometer control can be tricky because it's already not very precise. I still have to learn the common practices for handling the input, with things like varying device orientations.
     
    CoderPro likes this.
  35. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Thanks you, Now ! Its time for mobile improvement ! :)
     
  36. schwooba

    schwooba

    Joined:
    Nov 25, 2013
    Posts:
    33
    Hi. How would display a healthbar or damage status of the vehicle for the player. Would I use maxCollisionMagnitude in the VehicleDamage script? Thanks!
     
  37. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    The Motor and Transmission classes have a health variable representing how damaged they are. Once a transmission is fully damaged, it will no longer shift, and when a motor is damaged, it won't have any torque output, and the torque output declines with the health.
     
  38. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    Just updated to 2.0.4? Help me! Usually this would happen when I import a new asset that replaces the ProjectSettings files (.asset), but it would tell me in the console? Untitled.png
     
  39. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    The wheel cast mask on the GlobalControl object probably isn't set correctly. This layer mask determines which layers the wheels collide with.
     
  40. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    Cheers!
     
  41. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello, we are right now using unitycar, and it fits our game nicely, but we really liked the damage feature of your asset and want to implement it on cars rigged by unitycar, do you think it's possible? I think only difficulty would be with tires disintegrating and engine failure. Would there be other difficulties?

    We were using KGF orbit cam for our game but it got deprecated, and after looking for lot's of camera solutions(probably all of them on the store), your camera looked like it's the best fit for a car game. It has collision, It rotates by grounds angle(probably by raycast), and has a good smooth feeling.

    Is it also easy to use it without using together with car physics?

    The only think I didn't like on your camera is that, when zig-zagging from full left, to full right steering, camera has a weird motion. You can test it with muscle car, I will explain it better;

    At 20-30 miles, steering right, camera follows as usual, then suddenly start steering left, camera rotates to the left 2 times the speed it usually does, and it feels unrealistic. It's also unrealistic when moving fast and zig-zagging, but it's harder to realise the problem that way.

    Thanks.
     
  42. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I think the mesh deformation and part displacement could work with UnityCar.

    The camera only depends on the car physics for getting the ground normal and the velocity of the vehicle.

    I'm not seeing the camera problem myself, but the camera is rotated with WASD.
     
  43. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Camera follows the car's angle with rotating left/right behind the car, and it has a latency while following the car. Probably lerp.

    Making slalom-like motion with car steering while moving the car, you should feel the weird motion of camera, camera rotates double the speed it normally follows when car was going right, then instantly pressed steer left.

    While turning right, and then deciding to turn left, on that instance while car's angle changes, camera has a fast motion while trying to keep up rotating. It rotates faster than normal and feels unrealistic.

    I am not talking about WASD rotation.

    Thanks.
     
  44. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    I think I understand what your talking about now, it's because the local angular y-velocity is used to smooth the rotation of the camera, and because this value increases when turning sharply, it makes the camera seem to suddenly move faster. It's easy to disable this in the code.

    Edit: This is caused by the smoothYRot private variable in CameraControl.
     
  45. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Thanks a lot for sharing the related code, I will purchase it soon.
     
  46. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Hi @RandomationGames Could you make a system for car when car move on the ramp then will auto calculate rotation by code that not auto by rigidbody physics like the asphalt 8 game ?

     
  47. woodsynzl

    woodsynzl

    Joined:
    Apr 8, 2015
    Posts:
    156
    Does the suspension setup have to go:

    Suspension
    Wheel
    Rim
    Tire
    Or can it just go:

    Suspension
    Wheel

     
  48. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    While testing the demo, I realised it already has that system, but it's not perfect.

    It right now just rotates the car to a resting point where car is parallel to the horizon(it doesn't matter the grounds angle, it just makes the car straight). I think it could be improved by sending a ray to ground and rotate the car based on grounds(below the car) angle. Camera already has a feature like that.
     
  49. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    376
    You can only delete the tire, but the rim has to exist for representing the visual wheel. The object with the wheel script shouldn't rotate like the rim object. If the tire is deleted then popping it will throw an error; soon I'll add a null check to see if the tire exists before trying to deactivate it during popping.

    I'll add this to the to do list.
     
  50. CoderPro

    CoderPro

    Joined:
    Feb 21, 2014
    Posts:
    327
    Nice when hear you say that ! I will waiting for the next update for this amazing feature.