Player Movement Question
by Temasek Polytechnic · in Torque Game Engine · 01/04/2007 (7:11 pm) · 2 replies
Ok.
My player is controlled by the mouse left button (button0). When it is down, the player will move forward. When it is up, the player will stop moving.
I have a trigger. When the player enters the trigger, i want it to stop moving, so i did this:
My noMovement function is just empty. The problem is, when the player enters the trigger, it does not stop. The binding works only when i release the mouse button and click it again (meaning i release it first, then when i press it again, the player does not move)
How can i fix this problem without touching C++?
My player is controlled by the mouse left button (button0). When it is down, the player will move forward. When it is up, the player will stop moving.
I have a trigger. When the player enters the trigger, i want it to stop moving, so i did this:
function MyTrigger::onEnterTrigger(%this,%trigger,%obj)
{
moveMap.bind(mouse,button0,noMovement);
}My noMovement function is just empty. The problem is, when the player enters the trigger, it does not stop. The binding works only when i release the mouse button and click it again (meaning i release it first, then when i press it again, the player does not move)
How can i fix this problem without touching C++?
About the author
#2
01/07/2007 (6:18 am)
Put a physicalzone in the place with the trigger and make the physical zone have velocity 0
Torque Owner Joshua Jewell
This should have the same effect as releasing the mouse button.