need help with this

My idea is to make the character running from “A” to the wall once there rotate 90 grades and still running and go to “B”
any idea? i´m not a programer so be kind


use states:

state 1:
run left
until collision with wall -> state 2

state 2:
turn 90°
run down
until collision with wall -> state 3

turn 90°
run left

ok that´s sounds good but i never use states mybe an example .blend to take a better look and make a better idea.
thanks monster

ok here is a simple moving the cube, now how it´s work the state?


box.blend (250 KB)

This does what you wrote (first post). But somehow I have the feeling that is not what you want.


box_revised.blend (265 KB)

you are correct monster, it´s difficult to explain some stuff but it´s a mix of all. I want to move the character like my example with the keys, and when you touch the wall not only rotate the character, also rotate the cube. i hope to understand me. thanks