1
$\begingroup$

I've defined a Logic Bricks Simple Motion Actuator which responds to keyboard input to move an object along the Z axis. It works fine, but I want the object to be limited to move from 0.0 to 5.0 along the Z axis. Once it reaches one of those limits I don't want it to move anymore.

I tried adding an Object Constraint, which limits my ability to move it in the editor, but that constraint is not imposed by the game engine.

What do I need to do to impose that constraint on the game engine?

$\endgroup$
0
$\begingroup$

Constraints in game engine are defined using logic bricks or Python.

See the example file using the Constraint actuator: http://pasteall.org/blend/index.php?id=48429

BGE Manual: https://docs.blender.org/manual/en/dev/game_engine/logic/actuators/types/constraint.html#location-constraint

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.