x


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

more ▼

asked Apr 15 '11 at 02:15 PM

LeLag gravatar image

LeLag
1 1 2 2

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2584
x1947
x1765
x181
x11

asked: Apr 15 '11 at 02:15 PM

Seen: 1081 times

Last Updated: Apr 15 '11 at 02:15 PM