Descarga el archivo de este tutorial aquí:
https://drive.google.com/file/d/1JHkk4IKSaIx5YkE7cxWfHq21oXlB2YKZ/view?usp=sharing
La programación esta en las lineas siguientes:
from bge import logic as g, events
c = g.getCurrentController()
o = c.owner
teclado = g.keyboard.events
Motion=c.actuators ["Motion"]
c.activate(Motion)
move = 0.30
move2 = 0.05
loc = 0.00
rot = 0.00
if teclado[events.WKEY]:
loc = move
if teclado[events.SKEY]:
loc = -move
if teclado[events.AKEY]:
rot = move2
if teclado[events.DKEY]:
rot = -move2
Motion.dLoc = [0.0, loc, 0.0]
Motion.dRot = [0.0, 0.0, rot]
La programación esta en las lineas siguientes:
from bge import logic as g, events
c = g.getCurrentController()
o = c.owner
teclado = g.keyboard.events
Motion=c.actuators ["Motion"]
c.activate(Motion)
move = 0.30
move2 = 0.05
loc = 0.00
rot = 0.00
if teclado[events.WKEY]:
loc = move
if teclado[events.SKEY]:
loc = -move
if teclado[events.AKEY]:
rot = move2
if teclado[events.DKEY]:
rot = -move2
Motion.dLoc = [0.0, loc, 0.0]
Motion.dRot = [0.0, 0.0, rot]
0 comments:
Publicar un comentario