Locomotion help. Can you make this better ? Blend included

Can you make this better ?
How i can make it move at a angle. So if i press “W+A or W+D”
It will start to go in that direction and once i release “A or D”
It will continue facing that direction ?

The Motion Control is Vertex parented to Player box.

Have fun, add too it, add a camera ? lets see how good we can get it. So once a character is added with animations, its easy to implement :slight_smile:

  • hold on posted when wasnt ready -

This is a hacky way (I’m terrible with the BGE btw)

But if you have the keyboards inputs trigger at different frames, you can move diagonally, i.e (W and S skip = 0: A and S skip = 1) … but it’s kind of jittery, and there probably is a better way to do this! lol…

Another problem is i couldn’t figure out how to keep it moving in a diagonal motion when the keys are released

LOCOMOTIONhacky.blend (441 KB)

have use some empties for the direction of an 3. person camera view over track to (deactivate, activate) states maybe this can help

I would say, use python.
the basic system you want, i got it here in my movement script:

If you know a bit of python, you should be able to adjust it to your needs.

For example: player.py
if forwards and left:

set a direction property

elif forwards and right:

set a direction property

so when you create a property, you set it with the script, then either use scripts or bricks to read the property and let it (keep)move(ing) in the direction.

Sounds good, but the python one is very snappy. Turning should be a bit more fluid :slight_smile:

Turning should be a bit more fluid

your talking to who, atm? :slight_smile:

if me, then look up face direction, set turn_speed how you like at my_functions.py

You my friend are a god send. Am i okay to use your script in my game ? i will give you full credit.

Am i okay to use your script in my game

yes of course, i don’t put it in the resource section for nothing :slight_smile: