I have been trying to make ralph jump and i was looking through my code and im trying to set what happens when i hit the spacebar (which is supposed to make ralph jump)
here is code
# If a move-key is pressed, move ralph in the specified direction.
if (self.keyMap["left"]!=0):
self.ralph.setH(self.ralph.getH() + elapsed*300)
if (self.keyMap["right"]!=0):
self.ralph.setH(self.ralph.getH() - elapsed*300)
if (self.keyMap["forward"]!=0):
backward = self.ralph.getNetTransform().getMat().getRow3(1)
backward.setZ(0)
backward.normalize()
self.ralph.setPos(self.ralph.getPos() - backward*(elapsed*5))
if (self.keyMap["jump"]!=0):
What do i put after the bottom line???
Please HELP!!!
If you need any more information i can post
Please put any suggestions you have. I will try them all and see which one works