I’m trying to figure out how the constraint actuator works. At the moment, I’m trying to work with the orientation mode of the constraint actuator. The goal is: While a key is pressed, rotate an object along it’s z axis, until a max angle is reached.
CYNIC78 posted a blend file of how to make the constraint actuator do what I want, but I don’t understand how it works. https://blenderartists.org/forum/showthread.php?444009-Noob-Stick-with-logic-bricks-for-now-or-go-to-python-upbge&p=3275885&viewfull=1#post3275885
So what we have there is a keyboard sensor waiting for an ‘a’ key, which sends a signal to both a motion actuator (set for 1 degree rotation on the z axis) and a constraint actuator, which is in orientation mode. The ‘direction’ of the constraint actuator is set for ‘y axis’. Why is that? And the ‘reference direction’ is set for a small value of ‘y’. It seems that any value of y works the same.
The blender manual says that ‘direction’ is the axis to be modified. https://docs.blender.org/manual/en/dev/game_engine/logic/actuators/types/constraint.html
What does that mean? I don’t want to modify any axis. I want to set a limit of rotation for the z axis.
The blender manual says that ‘reference direction’ is the reference direction for the specified game axis. https://docs.blender.org/manual/en/dev/game_engine/logic/actuators/types/constraint.html
Again, I don’t know what that means. Why is a reference direction needed here and what does it have to do with setting a limit of rotation?