Hi,
I have a little problem with my collisions sometimes. When the player (Rigidbody 2D) jumps on spikes with a high enough horizontal walking speed, he sometimes doesn’t die. Instead he can just walk on spikes, as if the gravity wasn’t pulling him enough to kill him.
My player has a Continuous Collision Detection. The spikes have a Box Collider 2D.
Has anyone got an idea how I could solve this problem?
Thanks!
Check spike trigger bounds?
Thanks, I’ll try to check that.
Moreover I want to specify that I’m currently using OnCollisionEnter2D in my script. Would OnTriggerEnter2D make a difference?
Ok, I solved it with OnCollisionStay2D.
OnCollisionEnter2D doesn’t seem to be 100% reliable for collisions.
You’re saying that you get OnCollisionStay2D but not OnCollisionEnter2D. That’s a new one. Would it be possible for you to submit a bug report and a simple reproduction case please?
Ok, I reproduced the problem and submitted it. It’s possible I’m not correctly using OnCollisionEnter2D, so please let me know if you find another solution.
Thanks!
1 Like