- Home /
2D Checkpoint Collide not block
I want to have my checkpoint triggered when the player hits it but I don't want the player to be stopped when hitting it in 2D. I'm aware I could probably set something up like if(transform.position.x > Checkpoint.transform.position.x){checkpoint marked} although I would like to find if there's a way to solve it with oncollision. Any way to do this preferably in C# although I'm guessing I probably won't need to code unless I can't do it with oncollision? Thanks ahead of time.
Answer by Elier · Dec 30, 2015 at 04:53 AM
If you only want to register when the player enters the checkpoint area but not "collide" with it, instead of OnCollisionEnter2D
you should use OnTriggerEnter2D
and check the "Is Trigger" property of your checkpoint's collider on the inpector.
Also, in this case your checkpoint object shouldn't have a Rigidbody (since you don't want it to collide with other objects).
Your answer
Follow this Question
Related Questions
My OnTriggerEnter2D(Collider2D other) not working 1 Answer
Collision acting weird on mobile with touch input 1 Answer
Distribute terrain in zones 3 Answers
Interesting collision question 0 Answers
OnCollsionEnter2D not getting called 1 Answer