I need the functionality of both OnTriggerEnter and OnCollisionEnter in unity
I have game in development process in which i have a ball [I have to throw] which must be collide with other balls and behind these balls i have to trigger it with other cube [must be OnTriggerEnter On for the purpose that ball just pass on to the cube] . So my question is that whether i have to use in script [OnTriggerEnter] for the ball i have to throw or to use OnCollisionEnter.
Answer by Just_Jim_98 · Apr 16, 2017 at 12:07 AM
Im confused as to what you are trying to do however i can tell you what each one means
OnTriggerEnter will only run when the ball will pass through the cube (The cube will need its trigger option ticked in the inspector)
OnCollisionEnter will only run when a ball hits the cube, (The cube will need its trigger option unticked in the inspector)
I would say for what your wanting i think your looking to use OnTriggerEnter only if your wanting the balls the pass through
Your answer
Follow this Question
Related Questions
How to make physics collisions act like in old games (NES, SNES especially) 1 Answer
Multiple colliders BUG 0 Answers
object goes through first object but not the other. 3 Answers
Reloading a Scene Increases Gravity Acted on a Player 4 Answers
Best possible way to implement physics on a chariot 2 Answers