mouse position

Hi all, new to the forums here, and panda, and somewhat new to python.

Anyway, for my project, a space game I’m currently calling “Empty Caskets”, I’ve come up with a control scheme that requires me to know the position of the mouse.


if base.mouseWatcherNode.hasMouse():

does not do that regardless of what the manual says. Instead it gives me
(0.0, 0.0) which changes while the mouse moves before resetting to zeros.

A friend suggested that I could keep track of what this function does and its sum would be my position. The problem with this is that the position would be relative to the mouse starting position, not necessarily the center, one of the corners or any other predictable point.

any advice?

Thanks in advance

Thats a mouse watcher try the real pointer:

md = 0 )
x = md.getX( )
y = md.getY( )