Blender game engine events with python
We're searching for a way to script events in BGE instead of using there build in GUI version where you are using your mouse to mak开发者_如何学运维e events trigger your scripts. Isn't there a way to use events with python directly? Thanks in advance.
The only way to bypass the BGE event system is to read events with Python (which by it's nature inefficient).
You can read keyboard and mouse events or verify the scene with own algorithms.
I suggest to trigger code that depends on keyboard events with a keyboard sensor (allKeys mode) to get a better performance rather then an always sensor.
精彩评论