Simple Movement -- Blender 3D Game Engine


Stopping without sliding.

When you release the forward key, the Servo Control will be turned off.  Force will no longer be applied to the game object and it will continue to move until friction brings it to a stop. 

If you want the game object to stop without sliding, you will have to use a 2nd Servo Control to stop it.

The 2nd Servo Control must be turned on just long enough to stop the game object and then turned off.  If you leave the 2nd Servo Control turned on, it will 'fight' any effort to move the game object.

This tutorial uses State Mask Groups and a Delay Sensor to turn the 2nd Servo Control on and then off.

Add a NOR Controller

We want to wait until the forward key is released before switching to State Mask Group 2 and using the 2nd Servo Control to stop the game object.  The NOR Controller is activated when it receives a negative pulse (a key is released) from any sensor connected to it.

Buttons Window menu >> Logic (F4)
Controllers Add
NOR Controller
Add a State Actuator

The State Actuator will switch States on this game object to State Mask Group 2

Buttons Window menu >> Logic (F4)
Actuators Add
State Actuator
Operation:  Cpy
State Mask Group: 2