I have a pedestrian moving around autonomously by a CharacterNavigation script using a waypoint system. A Taxi which is moved around by the player. The Pedestrian has a Capsule collider and a Rigidbody with Gravity off and IsKinematic on. The Taxi has a Box collider and a Rigidbody with Gravity and isKinematic both off. Yet, if the Taxi stops on a crosswalk and pedestrian is crossing, he can walk right through the Taxi. Not what I was going for!
Thats expected behaviour. “If isKinematic is enabled, Forces, collisions or joints will not affect the rigidbody anymore.”
Instead you can use the methods for OnCollisionEnter(), or OnTriggerEnter() to do things on collisions with other colliders. And then for example pause the CharacterNavigation script for that pedestrian, until OnCollisionExit() is triggered.
I’m so confused
My Taxi (vehicle) has a Rb with IsKinematic off now and I have a roadside barrier (a cube) with a Rb and IsKinematic is also off, why is it, I can drive the taxi right through the barricade and through buildings? I had this working before, I constrained the Taxi to stay on the road by barricades on either side of the street, but I did something and now it no longer works. Help!