Question

I am using panda3d for a game, however, I am having some difficulties with accept:

 def acceptKeys(self):



    base.accept("arrowLeft", self.setKeys, ["arrowLeft",1])
    base.accept("arrowRight", self.setKeys, ["arrowRight",1])
    base.accept("arrowUp", self.setKeys, ["arrowUp",1])
    base.accept("arrowDown", self.setKeys, ["arrowDown",1])
    base.accept("space", self.setKeys, ["space",1])

The thing is, it works absolutely fine for space. It does NOT work for any of the othe keys, and I have tried it with charakter keys (such as w a s d), too!

Just nothing seems to happen when a key is pressed.

I did use the keynames that are given in the manual for panda3d. Any ideas?

Was it helpful?

Solution

The manual states that you should use:

   arrow_left
   arrow_right
   arrow_up
   arrow_down

Maybe it's that simple?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top