OnCollisionEnter only work if both collider's isTrigger=false
So the bullets have an OnCollisionEnter setup but will not trigger unless the character and the bullet are isTrigger=false I wouldn't mind the character having isTrigger = false but the bullests need to be isTrigger=true. Otherwise the bullets impact moves the character which is undesirable. Both items have Rigidbodies.
Answer by JedBeryll · Apr 23, 2018 at 07:41 AM
Use OnTriggerEnter on the bullet and notify the other scripts from the bullet script.
Answer by tormentoarmagedoom · Apr 23, 2018 at 08:18 AM
You have 2 diferent of colision detection, triggers and colisions.
OnTriggerEnter OnTriggerStay OnTriggerExit
If one of the colliders isTrigger=true, then use OnTriggerEnter/Stay/Exit
Bye!
Answer by Ystyr · Jan 16 at 09:03 AM
You could just set the mass on the bullet RB to a tiny value, so it would bounce off the character, not the other way around.
Your answer
Follow this Question
Related Questions
How i prevent 2 obejcts with kinematic checked in both rigidbodies collide? 3 Answers
How to check if gameObject is interact with multiple colliders 1 Answer
player going through walls even though it has colliders and rigidbodies 0 Answers
How do I detect a collision between two objects using Bolt? 1 Answer
my colliders don't work properly 2 Answers