I’m trying to create my protagonist’s motion system like in devil may cry, GoW and other action games like these.
I mean, if i press left arrow key the character will rotate to the left and then run in that direction, if i press up arrow key the character will go “inside the screen”, and so on… (so is different form the typical fps movement system, or the system shown in blendercoockies GE tutorial)
The base problem is that the keyboard gives digital signals, and so is impossible to emulate the movement like they are controlled by a joypad.
So i tried to control the player in only the main 8 directions:
Seen from above (there isn't movement along Z axes): (Y global axes in blender) up \ | / \ | / left | right (X global axes) --------------- | / | \ / | \ down
But my script seams not to work…
If any arrow is pressed the character will star walking haed.
If the up arrow key is pressed, then the orientation of the character should align to the globa Y axes, if the right arrow key is pressed then the character should align his orientation with the x axes, and so on…
My script is a total mess and it doesn’t work at all, so i ask you help…
Is this the right way to do this, and is there a python command for doing that and not work with rotation matrices?