How do i do this without python

Hi everyone. I am busy creating a 2d game and i want to make the following.

i have a 3d model and my camera operates as orthographic so that the model appears as a 2d model.

i have two keyboard sensors and two motion sensors. the first sensor is for the right arrow and controls the collision_box attached to my model to move forward on the (+x-axis) and the other sensors control the collision_box to move backward(-x-axis). i want the model to face the direction at which it moves. i.e. when i press the right_arrow my model face at the positive x-axis and when i press the left_arrow my model should not move backward facing the positive x-axis but it should also flip and face to the direction of the negative x-axis.

any help will be appreciated.

sorry for my bad english.


simple just parent 2 empty objects with your control box . one in front of it and one on back of it
then add keyboard sensors on armature for left and right arrow key connect them with edit object actulator set it to track to and set object to empty of the direction you want

maybe you can’t understand … =P have a look at this 2D.blend (503 KB)

I hope the model is parented to the collision box ;).

I think there are several options to do that.

A) use states (or an property to act as state). The state means the direction is either left or right.
direction = left
the user presses left -> it moves left
the user presses right -> it turns and sets direction to right

direction = right
the user presses left -> it turns and sets direction to left
the user presses right -> it moves right

B) move an empty (left, right), let the character follow the empty either via trackTo + forward motion, or via steering.

Thanks for your replies…That solved it.