Hello! I am new in coding and in PlayCanvas. My code for collision isn’t working properly. I am not entirely sure what is wrong. Both entities have RigidBody (Dynamic) and Collision component.
Instead of getting destroyed when hit by the witch, the cat was being pushed (because it’s Dynamic), but I want it to be destroyed. I set the RigidBody for the witch so I can applyForce for its movement.
What am I doing wrong? Thank you so much!
Hi @coffee and welcome! It took me some time to catch it, but the problem here is that you’re missing a capital letter. As a result, the onCollisionStart function is never executed.
Oh! Wow! I’ve been stuck for hours, and it is just one letter! Maybe, I’ve been looking at it for hours that I don’t know things anymore. Thank you so much!