Crouching
by Jookia · in Torque Game Engine · 04/17/2007 (3:02 am) · 6 replies
Okay, I have a model with crouch support but no way to implement it, the sequence names are as follows:
crouch
crouchRun
crouchBack
crouchSide
Any examples and hints are extremely helpful to me.
crouch
crouchRun
crouchBack
crouchSide
Any examples and hints are extremely helpful to me.
About the author
#2
04/17/2007 (3:50 am)
I've tried that and it didn't work well, all I need is the crouch that can go in all directions including staying the same spot without movin'.
#3
04/17/2007 (4:08 am)
You're going to need to code that functionality in yourself. The resource I linked to should serve as a good guide. If all you want is crouching ability, just rip out all the crouch related code from the resource and extend it to left, right and backwards movement (the resource already covers crouching whilst moving forward).
#4
" else if (getPlayerPosition() == 2) {
action = (mVelocity.len() < 0.5) ? PlayerData::CrouchAnim : PlayerData::CrouchForwardAnim;
} "
04/17/2007 (6:15 pm)
How do I extend to left right and backwards?" else if (getPlayerPosition() == 2) {
action = (mVelocity.len() < 0.5) ? PlayerData::CrouchAnim : PlayerData::CrouchForwardAnim;
} "
#5
if you know the "player position" numbers for those directions, add two pipes ( -> || -< ) and getPlayerPosition() == # for each position you want included...
- Ed Johnson
04/17/2007 (6:20 pm)
Quick Idea, I don't know if this will work.if you know the "player position" numbers for those directions, add two pipes ( -> || -< ) and getPlayerPosition() == # for each position you want included...
- Ed Johnson
#6
04/17/2007 (7:05 pm)
I don't understand what you mean.
Torque Owner Tim Heldna
Happy coding!