- Home /
Moving objects with attached colliders not colliding?
So in my scene I have a character with a character controller/animation script. Some cars were made to instantiate and destroy, with rigidbodies and colliders attached to them. So they translate with a particular speed, but when my character meets up with the objects, no collision occurs. The collisions work fine with other objects I've written collision scripts for such as other environmental objects..but not with the moving cars. The character just 'passes through' it. Please what could be wrong?
Thank you, please I'd really appreciate a quick help, deadline is in 2 days ... :(
Answer by IgorAherne · Jul 18, 2013 at 08:50 AM
I would recommend putting debug in the OnCollisionEnter(other : Collision)
if(other.tag == "car"){
Debug.Log("Collision with car")
}
1) if collision does occur, then it's probably the Destroy() that may be used incorrectly and doesn't get rig of cars. Check that particular function for flaws
2)if collision doesn't occur - check the car rigid body's component "is kinematic". Sometimes it affects colliders
You might try to add another collider different to the one you already have on car. Set this new collider to be trigger.
Your answer
Follow this Question
Related Questions
Dealing with 2D movement and collisions! 1 Answer
Character - Collider With Scene 0 Answers
Move object upon hitting camera ray 1 Answer
Collision Problem 1 Answer
collision child with rigidbody in parent 0 Answers