- Home /
scene rigid body
i have used the universal car control from the forums here on my car and i have a city from city engine when i start the game the car falls throw the city what can i do to prevent this from happening. p.s. the city is group of multiple models.
thanks.
Do your models have colliders?
I actually meant do the City $$anonymous$$odels (the terrain) have colliders =]
ok, are any of the colliders set to 'is Trigger' ?
You could do some testing. In one scene, create a large flat cube, then see if your car can drive on that. In another scene, create a sphere (with rigidbody to use gravity for the test) and place it above the city, then hit play so the sphere falls. If one of these tests fails, you'll know what colliders are not working as expected.
$$anonymous$$aybe also add an OnCollisionEnter function on the car with a Debug.Log( other.gameobject.name ); to see if the car is actually seeing the city mesh collider while it passes through (assu$$anonymous$$g at least one of these has a rigidbody component for OnCollisionEnter).
Answer by sam32x · Jul 23, 2012 at 08:58 AM
your city and your car will both need colliders, also if one of the car's colliders is sticking through the ground then it can fall through.
Your answer
Follow this Question
Related Questions
How do I detect how many collisions are happening in game (for all objects in a scene?) 1 Answer
When my car crashes into the guards, the game is supposed to be over! 0 Answers
Objects glitch between each other and the terrain 2 Answers
Movement Script Only Works in One Scene 2 Answers
How can I know when to instantiate skidmarks in a car game 1 Answer