View previous topic :: View next topic |
Author |
Message |
caval How do I cheat? Reputation: 0
Joined: 14 Sep 2023 Posts: 8
|
Posted: Thu Sep 21, 2023 9:05 pm Post subject: Unity's move-mouse handling ignores script |
|
|
Hey
Through a script I am trying to send input to a unity game (botting), I have no problems sending inputs like mouse click.
Now I can make the mouse moving in Unity game, but it looks like Unity is not "registering" the mouse move action.
Supposing npc should watch your mouse cursor, they would ignore it when the script run the mouse move.
I tried pyautogui, python ctypes, C directly but nothing changes.
It is strange because all other kind of mouse inputs gets correctly registered into the game like mouse click.
Any idea ? I even tried a b spline curve approach in order to simulate most natural mouse movement possible, but nope.
Is Unity not supposed to read input from win32 api anyways ?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 465
Joined: 09 May 2003 Posts: 25570 Location: The netherlands
|
Posted: Fri Sep 22, 2023 2:38 pm Post subject: |
|
|
which mouse movement methods have you tried ?
mouse_event API? sending wm_mousemove events ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
caval How do I cheat? Reputation: 0
Joined: 14 Sep 2023 Posts: 8
|
Posted: Fri Sep 22, 2023 9:12 pm Post subject: |
|
|
Did not notice event for this !
Much thanks, it works
MOUSEEVENTF_MOVE = 0x0001
ctypes.windll.user32.mouse_event(MOUSEEVENTF_MOVE, 40, 20, 0, 0)
# relative move, did not test absolute yet
while this did not:
ctypes.windll.user32.SetCursorPos(x, y)
|
|
Back to top |
|
|
|