- Home /
Question about Wheel collider use
I'm trying to create a model of a vehicle with no suspension or motor. Imagine shoving a shopping cart across a parking lot. I've been working with various wheel collider demos and tutorials which are all centered around creating an actual car.
My assumption was that what can do more can do less so, I tried using and modifying those scripts to simulate fixed suspension. I haven't had much luck. The springiness remains and leads to all sorts of craziness when I try to apply outside forces to generate a push. I'm wondering if anybody has any suggestions to create this effect or if the wheel collider object wasn't meant to work like that and I should explore other options.
Thanks, Geoff
Answer by Ashkan_gc · Jun 01, 2010 at 02:14 AM
if you don't need any motor behaviour or even wheel friction, why don't you use normal rigidbodies? to remove the suspension effect just set suspensionDistance to 0 (close) and set the spring to 0 too. you can use a raycast collider and a rigidbody and create your custom behaviour too. unity's car tutorial and networking example are good examples.
Setting the suspensionDistance and spring to 0 got me to where I needed to be. I also had to adjust where the colliders were being created. Without the spring the body was dragging on the ground and defeating the purpose of the wheels. I may revisit later and try the raycast method as that sounds interesting too. Good stuff,thanks.
always try to create as fast as possible so if your problem solved, don't think about it more.