What kind of a Vehicle would you like to see built with Wheelcollider?

Hello there,
I’m tester for Physics system in Unity. To test wheel colliders, I am planning to try and build a vehicle in Unity with it, and see how that goes. The results of this would be twofold:
A) More testing and more fixing of Wheel collider
B) A done project which I could share with everyone here and a blog post next to it how it went.

This way, I hope to be able to teach everyone more about the wheel collider while simultaneously learning more about it myself.

So my question here is, what kind of a vehicle I should start with? An average car, to benefit the most of you? Motorcycle? Tank? Tricycle? 20 wheel monster? :slight_smile:

2 Likes

Cool and welcome thread:).

You should begin with the basics and then to the advanced.
What else do I like to learn, is how to create and use wheelCollider in motorcycle and control.
And this is it:)

You demonstrate in videos or text?

Nothing challenging about most of those except motorbike.

do motorbike. interested to see your approach.

1 Like

My humble dream is to have some “light version” of wheel collider, as my use case is tank. Lot of tanks. Lot of wheels. Performance. Problems. And no, creating own system is not solution as scripted solution will never be as fast as “native” Unity implementation. Scripts are just slow.

I would like to see a haul truck, 2 front and 4 rear wheels. A tilt tray at the back would be nice too. I have been trying for days to achieve this and I am struggling to make the truck move. Any tutorial would help me really

@Roni92pl I would avoid wheel colliders in a tank setup. Theres no real gain and they aint really designed for it. I just faked it with inferno (see sig) using MovePosition to trundle the tank around.

@Bidsy try the wheelcollider script in my sig… Its capable of doing wheel setups like you mention. Make sure you remove any wheel colliders already on your vehicle before you try it. Its intended to set it self up (searching through the transforms and finding the wheels and creating the wheelcolliders, etc

Yup, you can use MovePosition when you don’t need them to move in physically realistic and visually pleasing way :wink:

Considering I went around the block trying different tank movement techniques, I can say MovePosition works best. Better than trying to put wheelcolliders on.

make a buldoser

I take back my previous request. I just want them work with slower fixed time update than default 0.02. I set 0.04 and vehicle is behaving very wrong.

Im curious why you are winding your time step back that far?

I think it’s pretty obvious - performance, and 25hz of physics calculations is enough for me.

Obvious? hardly.

I prefer my physics to be smooth and accurate. High time step will give you anything but.

Hallo Griautis,

definitely trailers for cars. Seems to be some kind of challanging to get these to work.

I`ve tried myself but there seems to be some kind of problem with thesuspension springs position. You can find more details here :slight_smile: http://forum.unity3d.com/threads/wheelcollider-problem-for-trailers-only-rolling-at-spring-position-0.367118/

Not sure if its some kind of bug, problem or just something I did wrong. But would be happy to hear about your testings when experimenting with trailers.

1 Like

4x4 Jeep. They’re lots of fun and the proper suspension constraints are critical.
A contrasting stiff suspension street race car type would be a good second example.

I think that would cover the spectrum decent, doing a vehicle with tons of wheels would be cool but I don’t think very practical as an example. Tanks are neat too, but probably not in-demand enough to justify priority over a Jeep + Streetrace Car spread.

An average car should be a good starting point for most users. Then, I’d like to see your approach on some advanced setups:

  • Motorcycle, where WheelColliders should work at sharp angles with the ground (this actually fails with cars).
  • Cargo truck, where the load is provided via additional rigidbodies (as seen here). WheelColliders support a non-predictable load without modifying their settings.
  • Tank, where two rows of WheelColliders are used for simulate the tracks. Each row should apply the same longitudinal force, no matter whether all of them are grounded, of just one or two of them. They should also spin at the low speeds typical of a tank.

These situations should expose most of the actual problems we’re experiencing with WheelColliders.

Thanks!

Hi James

@Bidsy try the wheelcollider script in my sig… Its capable of doing wheel setups like you mention. Make sure you remove any wheel colliders already on your vehicle before you try it. Its intended to set it self up (searching through the transforms and finding the wheels and creating the wheelcolliders, etc[/QUOTE]

Thanks for the SimpleWheel script, though I am having a little trouble make this to work. After dragging the script onto my vehicle I get an error “WheelCollider requires an attached Rigidbody to function”. Any suggestions as to how I fix this?

Thanks

odd, the script should add a rigidbody… did you have any existing components on the vehicle?

How about a skateboard?

I’d be interested to see a car with wheels that can move relative to the rigidbody they are attached to. This would be a car that can change the axis width and the distance between the axes while driving. That’s a case where I had a lot of problems in U5, which worked well in U4.

If it’s not clear what I mean, in this video you see the wheels moving together when flying (0:35).