- Home /
Strange behaviour with wheel collider
I'm building a racing game using wheel colliders and using a basic waypoints script I got from another site.
I ended up changing the original car mesh from the tutorial, to my own mesh.
The strange thing is when I control the player car, my mesh drives around perfectly and its as I want it, but when I do a copy of the player car, and then add the AI car waypoints script, my AI car just drives to the right and straight into a wall.
I've tested this and rebuilt the cars from scratch many times, but its only with my specific mesh the AI car moves to the right and gets stuck on the wall. When the AI car has the original car mesh from the tutorial, it drives perfectly. So the problem is not with the AI Car script, or the waypoints.
So my question is, why does my mesh drive fine with player input, but veer to the side and just drive into the wall with an AI Car and the waypoints?
(Note : I've tried two different waypoint scripts)
This one has me baffled. If anybody has any suggestions of thoughts, please do share them.
Thanks
Just a point in your debugging logic. It could be the AI Script, in fact I can't imagine it's not the AI script, since that should be the only thing making your car go. Obviously there is something different between the two car meshes that is having an effect when your script processes it. Can I suggest rebuilding the AI Script until the divergence occurs?
I think if you posted the code that is actually moving your car that would help as well. Is the car under normal gravity and PhysX?
Your answer
Follow this Question
Related Questions
Wheel collider help 0 Answers
Internal collisions 1 Answer
Discontinuity on mesh collider seams 2 Answers
Edit WheelCollider's Axis, not the Mesh 0 Answers
Rigidbody objects not colliding. 4 Answers