turn 90° left and right?!

hi all!

i’m busy making a game and thanks to this tutorials:

i can move my object :slight_smile:
but i have a question:

when i press my left arrow i turn left, thats what i want,
but i want to turn left in 90°, so my character has only 4 posystions, forward, backward, left and right, like a compass! and not something between left en forward, if you press left, my character has to make the whole turn of 90°!

how do i do that?


Here is a demo .blend, you’ll understand it right away. Hope it helps.

nice! thats more like it! :slight_smile:
but is it possible that you see the turn? like a smooth turn?

Well I can try, no promises though.

check out this demo

check out this demo

yes yes! thats more like it! :slight_smile: but when i use the uparrow i want to move forward! :slight_smile:
and its not 90° its more like 85°, it has to be 90°! :slight_smile:

many thanks!

I hevent looked at John_tgh’s file. I would just set up an IPO that does the 90° turn. This allows a smooth animation as well.

mmm don’t understand that?! could you explain that for me? :slight_smile:

I just used drot set to 1.80 which equals 90 degrees. An Ipo is an animation which animates an entire object, that is: [Moves] is, [Rotates] it, or [Scales] it.

But in order to make that work you’d still have to use Drot upon animation reset? I’ll test it later today :smiley:

mmmmm it is still not working!


Here’s one. You’ll have to hold the arrow button till the turn completes though. If you want it to be instant but still see the turning I know how to do it with python.


face direction.blend (131 KB)