- Home /
Punching a crate
Hey, I'm wondering how to detect that my character is punching on a cube. I have : - a Character Controller with a script that implements OnControllerColliderHit - a cube (my crate) with a script implementing OnCollisionEnter ans several methods (OnCollisionStay, etc...)
I manage to detect with OnControllerColliderHit that my character is colliding with my cube, but only when i move (i read that this fonction works only if the character is moving).
The problem is that my punch anim can be launched when my character doesn't move.
My question is : How do you detect colliding a character with an immobile game object ? The aim is to punch the crate and then applying some forces to throw it away...
Thanks
Comment