Side Scroller facing direction of motion

Ok, I am making a side scroller (or attempting to rather) and I have a walk animation that is activated when Ninja Penguin (Character) walks right, but I don’t know how to make him face the opposite direction when he is goin’ the other way. Your help is appreciated.

i sort of understand…so you cant get him to turn? or hes going the wrong way when you turn? post the .blend so i can see:confused:


The problem isn’t that I can’t get him to, it is that I don’t know HOW to get him to.

OOOOOOH!!! ok, so u dont know how to use the logic panels?

ok, so if havent done a walk cycle, then you can add that later. for the moment do you know how to use the logic panels at all?:confused:

clickhere. this has a walk cycle and movement. ignore the walk cycle for now. look at the logic panel and look at the ones that say keyboard sensor>and>movement

(edit) sorry, make sure the armature is selected. thats where all of the logic is set to.

when you say logic pannels are you talking about logic bricks? If so, yes I do know how to use them (or several of them) but I just dont know what I would do to make my character be facing the other way when he goes left EX: I have the walk animation for the right and when I press the right arrow key, it activates the animation and the dloc motion, but when I press left, it has dloc motion but the character is still faceing the same way, what should I do to turn him around?

This is a tricky one.

you have a dynamic object that dose all the actual movement and registers all the collision stuff.

To that dynamic object you parent your character.

on the right and left of the screen place 2 objects, and name them left and right.

program the dynamic object to send a message to the characters armature to walk, and to track to either the right or left of the screen.

hope that made sense.

p00f is the guy you should talk to, he is very good at making 2d games with the blender game engine.

Mmph, I don’t really know what you mean, can you reword this for someone who is new with the GE / me? thanks

Can anybody PLEASE help me with this?

here is the setup mmmph! is suggesting:
this uses three objects:

  1. a block we will name left_control, which we place on the left side of the screen on the same x-axis as the player.
  2. a block we will name right_control, which we place exactly opposite the left_control. (also on the same x-axis.
  3. the player object.
    now, for the player object here is how the logic bricks would be set up:
    keyboard(left key) >> and>> motion actuator (adjust your motion here) (now here is the important part for what you are after) you also want to add an “edit object” actuator. you want to select “track to” and then write in “left_control” for the object to “track” to. this should cause your player to face the direction of the object it is “tracking.” now set up your bricks for your right key press, using the right_control to “track to.”

if you are using ipo’s for your animation then you would want to trigger it most probably from within this setup. if you are using bones/armature animation you will need to set up your animations under the armature. (see the OTO the Cleaner tutorial for the best (most complete) set of instructions for setting up armature animations in the game engine…)
anyway, good luck, hope this helps… (and thanks, mmmph! for the great idea, this actually helps eliminate a bug from the method i was trying to use…)