- Home /
Cube colliders and cars
Hello!
I'm using 3d cubes in my car game as walls for racing tracks, but when a car collides with it, it looks very clunky and sometimes bounces backwards.
What do I need to do to get the walls to have more of a friction-like effect?
on the collider is a $$anonymous$$aterial slot you need to use that. then its a matter of creating a material that behaves the way you want if they are bouncing back on you , you may be hitting a corner unless you are hitting them square the you are getting the expected behavior from the collision.
Answer by skylem · Jan 13, 2015 at 08:25 PM
to expand upon the first comment, You create Physics Materials to set friction and bounce to Colliders, Create a new physics material and add it to your terrain or vehicle and set the friction and bounce parameters to suit your needs, Also are your collisions handled by a rigidbody? if it is a rigidbody the above should work, if it is not a rigidbody then you should handle collisions by using FixedUpdate(). The Center of Gravity could also be relative to your problem, and try adding more Box Colliders(if your using Rigidbody) to spread the weight of your vehicle.
Thank you Skylem. I think your answer will get me far enough. :)
Your answer
Follow this Question
Related Questions
Internal collisions 1 Answer
Does anyone have figured the WheelFrictionCurve struct ? 2 Answers
WheelCollider - I don't have a circle of Collider 1 Answer
Edit WheelCollider's Axis, not the Mesh 0 Answers
How many can I get away with? 0 Answers