0
votes

I have created simple project with 3D car and terrain. I have added 4 Wheel Colliders on model wheels. But when I run project wheels falling through terrain.

Before run: enter image description here

After run: enter image description here

I am sure that at start wheel colliders above the terrain and not intersect it. Configuration is: enter image description here

In what problem is? I have tried a lot of different things but I can't find a solution.

3
try rising the whole car up first, let it drop on the ground and observe how the collider works. - user2140173
I have tried that, but situation is the same. - Dmytro Zarezenko
this would be a better fit for gamedev.stackexchange.com - LearnCocos2D

3 Answers

1
votes

It doesn't seem like the collider is covering all of the wheels(looking at image 1) can you extend the collider downward to do such.

0
votes

Not a unity user, but it looks like you are defining the center of your collider to be a different spot than the position of your wheel - I would guess the "center" of the collider should either be 0,0,0 or it should be the same as the wheel position, with a radius equal to the radius of the tire. Or just play with the x,y,z values one at a time to see exactly what changes.

0
votes
  1. Check the standard assets for the vehicles section, look in car. Add the car into your scene and see how it works.

  2. Make sure your rigidbody is in the top of the hierarchy of your car. Make sure the collider for the main body of your car isn't on the same gameobject as the rigidbody that messes things up.

  3. Try as much as you can to take the values from the standard asset car and paste them into your own. You can do this by right clicking the wheel collider on the standard car and selecting copy component. Then right click your own wheel collider and selecting paste component values.

  4. If your car is bouncing really high after this it's probably because the spring/damper variables in the wheel collider component are to high. Either lower them or, alternatively raise your rigidbodies mass to something like 1000.