crouching
Code: Select all
irr::vector3df vPosition = camera->getPosition();
vPosition.Y -= 50; // Or whatever the difference between standing and crouching
camera->setPosition(vPosition);
Crud, how do I do this again?
You'll need to also change the size of the player for collision purposes.
Check out the collision tut and see the point where 3 numbers defin the collision ellipsoid and just change those when crouched.
Without doing this your player is still say 6 feet tall but you are just positioning his/her eyes halfway down rather then "physically" crouching.
Check out the collision tut and see the point where 3 numbers defin the collision ellipsoid and just change those when crouched.
Without doing this your player is still say 6 feet tall but you are just positioning his/her eyes halfway down rather then "physically" crouching.
-= Want your C code to control real life robots? www.users.on.net/~symes =-