Using mouseMove() in Games that capture the mouse
I'm trying to automate an Unreal based first person 3D game that captures the mouse. I can use mouseMove() just fine for a bit but eventually get errors like:
[error] RobotDesktop: checkMousePosition: should be L(937,1289)
and
[error] Location: outside any screen (937, 2160) - subsequent actions might not work as expected
Is there any way to tell SikuliX "just move the mouse to the right without any concern for positioning or screen size" to essentially make the character in the game spin in circles as if I was moving my mouse right for a while?
Edit:
I now found out that this behavior seems to depend on the Game Engine. In some games the cursor stays in the center of the Screen while in others it's being moved.
To illustrate the issue I'm trying to solve I create a short screen capture:
https:/
In all cases I'm using a very simple loop
while True:
mouseMove(100, 0)
The first game captures the mouse and keeps it at it's own windows center. For some reason however the mouse movement seems very erratic. Instead of just moving sideways it moves up and down as well. Also moving only 10 pixels seems to result in a full rotation in game.
The second game captures the mouse but doesn't keep the cursor in the center. I was using the guide extension to show when the cursor is being moved by SikuliX. Whenever the guide becomes active one can see the current cursor position and how it's moving towards the right. Movement stops once the cursor hits the right side of the screen.
Without the guide active however movement becomes quite erratic as well. As if it's jumping large distances but also moving up and down.
Any hints as to how I could solve this esp. with the second game would be greatly appreciated. Essentially what I'm looking for is a continuous mouse movement to the right so that the character in-game looks around until SikuliX finds the pattern I'm looking for.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: