help with movement script anyone? and where to find tut

import bge
from bge import logic
from bge import events
cont = logic.getCurrentController()
obj = cont.owner
collision = cont.sensors[“Collision”]
key = logic.keyboard.events
DOWNARROWKEY = key[events.DOWNARROWKEY]
RIGHTARROWKEY = key[events.RIGHTARROWKEY]
UPARROWKEY = key[events.UPARROWKEY]
LEFTARROWKEY = key[events.LEFTARROWKEY]
yMove = 0.0
xMove = 0.0
zRotate = 0.0
if RIGHTARROWKEY == 2:
zRotate = 0.1
if LEFTARROWKEY == 2:
zRotate = -0.1
if DOWNARROWKEY == 2:
yMove = 0.1
if UPARROWKEY == 2:
yMove = -0.1
obj.applyRotation([zRotate, zRotate, 0.0], 1)
obj.applyMovement([xMove, yMove, 0.0], 1)

yMove = 0.0
xMove = 0.0
zRotate = 0.0

i cannot figure out how to make my character rotate correctly, left or right, ive done much searching aswell as tinkering, sorry if theres already answers around! where can i find a tut for using sword in game engine? ive been searching for quite awhile with no luck what so ever, thanks in advance!

Edit: added my blend, the model is from “UniHuman”, character bounds are all messed up…idk what i did lol
Edit: Ive found many tutorials on how i was just looking under the wrong forum

Attachments

Silent_Space.blend (1.76 MB)

all i can say is that you should space out your code so that theyre easier to work with.

thanks, lol

Fixed and Fixed, you were rotating on 2 of the wrong axis. i Set it to rotate on the correct local axis. also changed the dynamic collision, you can figure out why the sword falls yourself :wink:

!! wow, thank you very very much, it works perfectly, and thats another thing ive been trying to figure out, ive got a long ways to go, lol but nothing else in the world to do,