Top-Down View Controls

I am trying to make a ‘top down’ view game. I can’t figure out how to set up the controls. The player will be in a constant forward motion. When I press left, I want to go left. Down goes down, etc. Using rotations doesn’t work, since left will turn left, then left again will turn down…

I tried parenting an object to it, then left tracks to the object, but the the object rotates with it, causing the same effect as above.

I don’t want to use python, as I don’t understand it, and overall it will be a simple game.

Any ideas?
Thanks.

Will the camera be rotating with the player?

No, for the most part, the camera will be stationary. The eventual result will hopefully be a two player ‘top down’ view, like an old arcade game.

Well, you can do the movement part fairly easy. Connect keyboard sensors to motion actuators as follows:
W -> +y linear velocity
A -> -x linear velocity
S -> -y linear velocity
D -> +x linear velocity
Make sure the local button is disabled on all motion actuators (“L”). It should give you your basic movement.

If you want the player to align to the direction it is moving you’ll have to use some python - don’t worry, it is actually quite simple. Connect the following script to an always sensors (assuming blender 2.5x):

import bge

ALIGN_SPEED = 1.0 # set this to determine how fast the player aligns to the motion. 1.0 being instant and 0.0001 being really slow.

own = bge.logic.getCurrentController().owner
vel = own.worldLinearVelocity()
own.alignAxisToVect(vel, 1, ALIGN_SPEED)
own.alignAxisToVect([0,0,1], 2, 1)

As you can see, we simply use a handy function alignAxisToVect() to orientate the object to a vector.

Blender Game Engine Started
Python script error from controller “Python Script#CONTR#5”:
Traceback (most recent call last):
File “Vector Align”, line 6, in <module>
vel = own.worldLinearVelocity()
TypeError: ‘mathutils.Vector’ object is not callable
Blender Game Engine Finished

I can’t figure out what its trying to tell me…