Search Unity

Randomation Vehicle Physics, Supports Cars, Bikes, Monowheels, and More

Discussion in 'Assets and Asset Store' started by JustInvoke, Oct 8, 2013.

  1. Gherid_lacksGPS

    Gherid_lacksGPS

    Joined:
    Dec 3, 2011
    Posts:
    111
    Looks absolutely wonderful; good docs, clean, no extra BS art assets you're not going to use, just some quality functionality and mechanics. After the holidays I'll probably be picking this up. A question and couple of feature considerations:

    I'm assuming people who purchase the package will get free updates as / if you release them?

    Functionality considerations regarding two/one wheelers:
    -- A "balance" mechanic, say when landing off axis from a jump, performing endo/manual's or unicycle type balance points. Perhaps just an option for it?
    -- A niche feature, but perhaps a "grind" trick function on two / one wheelers, for bmx / unicycles or similar.
    -- Perhaps it's beyond the scope of your intent, but rider crash/ragdol, or rider implementation in general.

    Again, your work is fantastic and I look forward to getting my hands on it, once I finish up buying my peeps their holiday toys :). Demo alone is so fun.
     
    Last edited: Dec 9, 2013
  2. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I understand a lot of devs here prefer C#, but I'm currently not ready to provide that version. I can see a lot potential headaches in converting it.

    Users who have purchased it get free updates. As for wheelies and endos, I might make it so you can earn boost quicker by pulling these off. Grinding is beyond the scope of this, and adding more tricks would require some changes in the HUD script. The only two stunts currently possible are drifts and jumps and there isn't a system in place for labeling more stunts. This is more of a basic physics package rather than a starter kit for stunt games, but this could be an interesting idea for a future package. Riders/drivers are also not part of the intent for this package.
     
  3. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    403
    Just a friendly bump here... I purchased Randomation Vehicle Physics a while ago and this is for my personal taste the best vehicle physics for Unity by far! Might not be the 'feature rich' like the other efforts, but the playability is just better. When i implemented Randomation everybody that has tried my levels enjoys them like its on a console, just feels solid!!

    Thank you, Justin! I hope this reaches more people... its a hidden gem on the AssetStore!
     
  4. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Thank you for the positive feedback. I appreciate hearing how much people enjoy driving the vehicles.
     
  5. hamyshank

    hamyshank

    Joined:
    Jan 31, 2013
    Posts:
    88
    Purchased this asset last night and I am very impressed. It's not easy to make a fun vehicle physics with just using the keyboard, but Randomation has got it just right.
    If anyone is wondering how good this asset is, just check out the web demo. Highly recommended.
     
  6. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Customers using Unity 4.3 may notice an error when returning the friction from terrain colliders and wheel colliders. I already have a fix, I just need to submit it to the store. This will come as version 1.2.
     
  7. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    1,181
    Any comment/comparison on the other packages?!

    But indeed I would snap up this package if price dropped a little as perhaps best vehicle demo I've seen (by far for 2 wheels) so would love to play with it.
     
  8. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I submitted it to be part of a sale a few weeks ago, but Unity hasn't gotten back to me yet.

    Another thing about the friction bug:

    Version 1.2 of the package will only support Unity 4.3.2 and later. This is due to the friction bug I mentioned earlier. Basically, a vehicle returns the friction of a terrain collider to set the friction of the wheel colliders. Unfortunately in 4.3, a change was made where terrainCollider.material is invalid, so in order to get the friction of a terrain collider I must use terrainCollider.terrainData.physicMaterial, which is invalid in versions prior to 4.3. This means I can no longer support Unity 4.2 with this, which is a shame because I know some users are reluctant to upgrade.
     
  9. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    @OP.

    Have you make some test in gravity?. I mean around a planet/sphere.
     
  10. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I have experimented a little bit, and vehicles can be driven on any surface angle. You would have to disable rigidbody.useGravity and use rigidbody.AddForce in FixedUpdate with the acceleration force mode and a vector with a magnitude of 9.81. The vector would be the normalized direction from the car's position towards the planet's center, multiplied by 9.81. I could add this in to the package, but I've been having trouble updating it.
     
    Last edited: Dec 29, 2013
  11. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Thank for the reply.
     
  12. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Randomation Vehicle Physics 1.2 has been released with the following changes:

    - Fixed bug with returning the friction of terrain and wheel colliders in Unity 4.3.

    - Added SetDoppler function for setting the doppler level of all audio sources on a vehicle.

    This means that the new update and all future updates will require Unity 4.3.2 or later. This is due to changes regarding the way friction is returned from terrain colliders, and had I not updated it, all users with Unity 4.3 would be thrown errors when driving on terrain.
     
  13. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,426
    Written in JS. How disappointing...
     
  14. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    403
    That's great!!!
    Thanks a lot!
     
  15. TymNetwork

    TymNetwork

    Joined:
    Jan 16, 2014
    Posts:
    71
    Tell me more. How do I get the update? You know I bought this awesome package few weeks ago.
     
  16. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Can you just re-download it from the asset store? I'm not sure how it distributes updates because I've never actually purchased anything from the store myself.
     
  17. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Randomation Vehicle Physics 1.3.1 has been released with the following changes:

    - Fixed overlooked input functions in the WheelEnhance script, where they contained specific input axis strings rather than references to the dynamic ones in ControlScript.

    - When the Avoid Roll Over variable in the VehicleParent script is set to false, bikes and monowheels will now fall over rather than always try to stand up.

    - Kickstand variable added to the VehicleParent script; when set to true, bikes and monowheels will tilt slightly to the left as if they are being held up by a kickstand.

    - Wheel gizmos now move along with the wheel mesh in play mode making for easier adjusting.
     
  18. PJisAnarchist

    PJisAnarchist

    Joined:
    Jan 9, 2012
    Posts:
    9
    Hi.
    How could your framework handle AI opponents racing against you? With a plugin (wich one?), or do you plan to add that functionality in your framework?
    Thx
    PJ
     
  19. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    There are no plans for this, but it's set up such that you can easily add your own AI code. Getting a vehicle to drive to a point is easy. As for racing, perhaps with a plugin for creating paths and smoothly interpolating along them you could program the vehicles to follow along a path. Maybe even having an array of waypoints would suffice if the tracks are simple.
     
  20. PJisAnarchist

    PJisAnarchist

    Joined:
    Jan 9, 2012
    Posts:
    9
    Ok, thanks for the quick answer. I guess it would require a lot of work, to get a multiple waypath system, collision avoidance and intelligent driving (brake, steer, correct a false trajectory...
    I'll check the other car solutions before buying yours, even if the driving feels better/funnier in yours.
    Cheers,
    Ju
     
  21. Goldrake

    Goldrake

    Joined:
    Feb 6, 2010
    Posts:
    143
    I have a question, qat about performance? for example if i have 50 vehicles in a scene moving by ai, what would be it's cpu / fps load?

    Thanks!
     
  22. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    About 1 FPS, it can only handle about 15 vehicles at 60 FPS. I'm not sure where I could cut corners to improve this, as it's difficult to tell which scripts are slowing things down since I don't have access to the profiler in Unity free. Pretty much all of the calculations are crucial to the physics. Perhaps reducing the GetComponent calls would help?

    Another thing is that having 50 cars causes problems with the audio since each car has at least 10 audio sources.
     
    Last edited: Mar 27, 2014
  23. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Randomation Vehicle Physics 1.4 has been released with some minor improvements:

    - Added checkboxes for easily disabling the demo menu and HUD. These can be found at the top of the Control Script and the GlobalControl object as “No Menu” and “No HUD”.

    - You can now have 2-wheeled vehicles which don’t behave as bikes. Only vehicles with wheels in line with each other will act as bikes.

    - Auto Look variable added to the Camera Script, this makes the hood-view camera turn a bit to face the direction you are moving, making the camera feel less stiff.
     
    Last edited: Mar 26, 2014
  24. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    403
    Another bump here to remind people to check out this package, its worth it people... SEGA quality!
    >>> Randomation Web Demo <<< make sure you plug in your xbox360 controller for extra fun!!!

    A question to the developer:
    How/where do i disable (or hide) the timescale slider? It shows even if the No Menu and No Hud are checked.

    Thanks a lot! Great update man!
     
  25. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Thank you for the positive feedback.

    The timescale slider is something I overlooked unfortunately, you can comment it out in the OnGUI function in ControlScript. The next version will fix this, but I'm not updating it until I add some more features.
     
  26. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    403
    Thanks a lot, works well.
     
  27. BoneyPile

    BoneyPile

    Joined:
    Apr 20, 2014
    Posts:
    12
    Hey,
    I am having a lot of trouble whenever I switch computers.
    I do a lot of work on my laptop on the road, and my desktop at home.
    Everything works fine, but when I export the package and reimport it onto my laptop, it goes so slow.
    It runs at about 1fps, then freezes whenever the car contacts the ground.
    I have tried all types of ways to transfer.
    I have just copied the whole folder in my documents. I've tried exporting the package. Nothing works. Only my original file works smooth.

    Do you have any tips on transferring from computer to computer??

    Even when I reimport the package onto my desktop it runs slow. What is going on??

    Also a bug you might want to look at, not sure if its just on my computer though. The ebrake works fine while going right, but when you have the left button depressed the ebrake wont work. you actually have to lift up on the left key, tap the ebrake, then hit left again. But the ebrake wont work while the left button is depressed.
     
  28. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I'm not quite sure what could cause this framerate issue, does the console show any messages or warnings? Are the project settings all the same?

    As for the ebrake bug, that's probably an issue with the keyboard itself, as most keyboards can only detect a few keys at a time, and the space bar might conflict with the arrow keys. In the input manager, try changing the accel and steer buttons or the ebrake button.
     
  29. BoneyPile

    BoneyPile

    Joined:
    Apr 20, 2014
    Posts:
    12
    Thanks for the ebrake tip and the quick reply! You were right, it does that same thing with my other packages. the left button is definitely interfering with the space bar.

    Anyway, for the project settings. everything remains the same.
    When I want to transfer the project to my laptop, I just click export package. Then import it into my laptop. Is this the correct way, or should I just be copying the whole project folder over? It actually just completely crashes unity now when I try to play the newly imported package. but it plays fine on the original.
    I know thats kind of vague and probably hard to understand, but is there a better way to transfer this project over to my laptop?
     
    Last edited: Apr 22, 2014
  30. BoneyPile

    BoneyPile

    Joined:
    Apr 20, 2014
    Posts:
    12
    So apparently I just need to turn on meta files in the editor options.
    This isn't a problem with your package, I've researched a little more and found out its just a unity issue.
    There is 999+ errors when I hit the play button :(. everything breaks when I transfer computers...

    Great package btw. I'm amazed at how much you can do with it. This is literally the base for about 100000 different types of games. Good luck with sales!

    btw, let you guys know how it works on mobile in about a weeks time!
     
    Last edited: Apr 22, 2014
  31. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I'm glad you found the source of the problem, I wouldn't have found it.

    Other users of the package have been able to make it work on mobile, but they had to use their own solutions for touch input as my package does not support it out of the box. This also means you have to replace the Input.GetAxis and GetButton functions with references to the virtual touch axes.
     
  32. venusboysatish

    venusboysatish

    Joined:
    Jul 10, 2012
    Posts:
    25
  33. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Version 1.5 has been released with the following changes:

    - Added "Dive Factor" variable to VehicleParent to make vehicles dive forward while in the air.
    - Most of the GetComponent calls in the scripts have been cached to improve performance and simplify code.

    Cleaning up the GetComponent calls didn't increase the performance much on my machine, but others might notice a bigger difference. The time scale slider also disappears when the No HUD variable on ControlScript is set to true now.
     
  34. dustymax

    dustymax

    Joined:
    May 19, 2014
    Posts:
    1
    Can it be used along with Track BuildR or EasyRoads3D?
     
  35. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I'm certain they would work together, my physics can handle any type of collider. I assume both of those tools generate concave mesh colliders.
     
  36. SheheryarAamir

    SheheryarAamir

    Joined:
    Dec 21, 2012
    Posts:
    23
    can you please help me how can I configure a physics (springs, shocks ) of a bike available in your project to act like a trail bike or dirt bike.
     
  37. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    Sure, I've already helped others with this. First you need to add a variable named "compression" or something similar to CarWheelScript in the Update function. This will return a number from 0 to 1 showing how far the suspension is compressed.

    This is the calculation, 0 = compressed, 1 = extended:
    Code (csharp):
    1. //This will be inside of the following if statement already in the script:
    2. //if (wHit.collider.Raycast(ray,hit,wheelCol.suspensionDistance + wheelCol.radius))
    3. compression = Mathf.Clamp01((hit.distance - wheelCol.radius) / wheelCol.suspensionDistance);
    If you e-mail me I can just send you the script, or you could send me your project and purchase invoice number and I'll tailor it to your bike.
     
  38. austint30

    austint30

    Joined:
    Jul 1, 2013
    Posts:
    70
    Nice physics dude! I spent about a hour playing the demo and I'm really looking into buying it. Right now I am making an arcade racing game and these physics will fit in just PERFECT!!! But there is one thing bad about about these physics. THE PRICE!
    No offence but, $100 really? My parents will never let me buy something at that price. The price is way to high for my wallet. Please, PLEASE lower the price to something like $50 and I may buy it. I really want these physics! :(
     
  39. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I've thought about lowering the price, but been reluctant to do so since it would obviously draw more customers. Of course more sales is always good, but I'm too busy to provide adequate support for more customers. I'm waiting for sales to taper off before lowering the price, and lessening the support. Perhaps next month I'll lower the price if this month is slow, but I need to contemplate this further before making the cut.
     
  40. crag

    crag

    Joined:
    Dec 13, 2013
    Posts:
    145
    @Meltdown read through this thread because I have an invested interest in various "motors" and read your post, many minutes later, I am still failing to see the point. Can we dump troller posts Unity?

    @RandomationGames killer work man. Having had built custom wheel motors, I can honestly say $100 is well worth the price for this package. Not sure why people would gripe as it would take them a year to build something this comprehensive, costing them thousands. I'm considering throwing some of my work out and replacing it with yours! ;)
     
    JustInvoke likes this.
  41. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,426
    Failing to see the point of what?
     
  42. crag

    crag

    Joined:
    Dec 13, 2013
    Posts:
    145
  43. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    403
    Completely agree!
    Lowering the price will attract more moaning children and you may regret it in the end. 100$ is nothing for such a work.
     
    JustInvoke likes this.
  44. austint30

    austint30

    Joined:
    Jul 1, 2013
    Posts:
    70
    I have been looking around for a good (preferably free) unity car physics around the web. But nothing else really caught my eye as much as yours did! I really am looking into buying it, but the price is too high! (for me) Maybe if I lose all luck finding a good arcade driving physics engine then I might buy it. I have the urge to buy it! Driving on the wall is epic! No other physics does that! :)
     
  45. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    178
    I disagree. Taking complaints, criticism and other forms of feedback are extremely beneficial to any entity that deals with a customer base. What @Meltdown has done here is voice his dismay. He like many others including myself don't like to mix and match Java with C# or have whatever reservations they may have about the language. Because of this it ends up being a deal breaker on the asset. He has voiced his interest in the plugin but his disapproval of the language used. By doing so he is showing and giving the author valuable insight to help him gauge just how many people are looking to buy this asset, but are turned off by the fact that it is in Javascript.

    @RandomationGames has already stated earlier his stance on the matter so he already agrees with him on this front, he just doesn't see it viable or want to spend the time on doing so. With demand comes supply and anything can change. If Random decides it might be financially beneficial for him to port the code to C# to net more customers people like Meltdown would have been key proponents in that change.
     
    Meltdown, JustInvoke and c-Row like this.
  46. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    I would be interested in c# version as well :) I even thought of taking this asset and try to convert that kit with it:) but this is another 45 bucks :/
    https://www.assetstore.unity3d.com/en/#!/content/20232
    either way I don't need this kit right now and when I do I hope there will be c# version of it :)
     
    Meltdown likes this.
  47. crag

    crag

    Joined:
    Dec 13, 2013
    Posts:
    145
    @Ghosthowl, see what @cg_destro did there?
    so much better than
    FWIW, I like when plugins are written in either too but that still doesn't mean we need to express to the individual that put for all this work that we find it disappointing. Criticism can be constructive, negativity is destructive.
     
    Last edited: Sep 1, 2014
    Ghosthowl likes this.
  48. JustInvoke

    JustInvoke

    Joined:
    Jul 16, 2012
    Posts:
    332
    I would probably rewrite the whole thing from scratch before converting it, which won't happen soon either. I understand C# is the more popular and more powerful language, but for now UnityScript suits my needs.

    The impending arrival of Unity 5 and its updated physics is another reason I'm holding off on it. This article in particular highlights new wheel colliders.
     
  49. cg_destro

    cg_destro

    Joined:
    Aug 13, 2013
    Posts:
    142
    sound good to me :) new random vehicle physics for new unity with new features :) I can wait for that :)
     
  50. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    178
    Yes, you are correct in that regard and I agree with you 100%. There are many ways he could have put things in a much nicer way, but that is aside from the point. I was merely disagreeing with your original thoughts that his post had 'no point', was a 'troll' and should be removed. I was defending his stance from that perspective.

    Also after many years of experience on the internet I have to say I felt his response was very kind compared to the usual nonsense. =(
     
    crag likes this.