To be more precise, I have 4 viewports (its actually two but each with an overlay).
The problem is when I do “getRaySource()” it returns the source of a different viewport than the one which I have the mouse over.
Here’s my exemple blend, press P over the 3D viewport and move the cursor from the upper viewport to the bottom viewport…
Ok obviously you dont get what the problem is, I checked over and over and this really does look like a bug.
the .raySource property of the MouseOverAny sensor returns the raySource of the wrong viewport (no the same viewport as the mouse is positioned on). So when you put the mouse at the bottom of the second viewport, the custom cursor is set to the bottom of the first viewport and same ViceVersa.
The worst is that I can’t find any fix or workaround
If the camera that it picks is predictable, you could subtract that camera’s position and multiply by its orientation matrix, then get the mouses 2d position to determine which view port it is on and add that cameras position and orientation matrix to the vector