Stop player moving
by Leslie Young · in Torque Game Engine · 03/11/2003 (11:59 pm) · 1 replies
Where would be the best place to put code that would stop the player from moving in the x-coordinate (may still move in Z (up) and Y). This must also NOT allow the playe model to be pushed in any other value that 0 for x when colliding or sliding. Basically I want the player to always stay in 0 for coord x but y and z may be what ever result from movement.
I made mVelocity.x=0; at the end of function Player::updateMove(...) and that stopped the player from moving in the x-coord but with some collisions he could still be forced to move along the x-coord (not with normal collision that just stop him though, more like sliding)
I made mVelocity.x=0; at the end of function Player::updateMove(...) and that stopped the player from moving in the x-coord but with some collisions he could still be forced to move along the x-coord (not with normal collision that just stop him though, more like sliding)
About the author
Torque Owner Leslie Young