[SOLVED] Hitbox question

Greetings. I know the “best” way to have a hitbox for your character is to parent armature to a box which will work as a physic model for your character.

My question is:
What is a good and simple way to change the hitbox size while your character is for example in crouch or prone position?

Would a simple shapekey animation work for the hitbox without it messing up the physics?

I’m not totally sure how to do this, but I think it’s possible to use the replace mesh actuator and use python to update the bounds. Then when you’re finished you can replace back the tall hit box and update the bounds again. I’ll see if I can make an example to post it here, but if I am wrong I won’t :stuck_out_tongue:

The replace mesh actuator will work, you can have it inherit the collision bounds by turning on the physics button, but the bounds type has to be triangle mesh, or it won’t work.

I have been thinking about replace mesh but haven’t had any chance yet to try it out. How would it act if the player was against a obstacle with a smaller hitbox and all of the sudden it changed to a bigger one?

I was thinking about changing the scale of the current hitbox via python dynamically according to the pose. Do you think it would be a bad idea?

That should work. I think only Convex Hull bounds update with scaling, though I’m not 100% sure.

check this thread: http://blenderartists.org/forum/showthread.php?190196