Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Unity's move-mouse handling ignores script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
caval
How do I cheat?
Reputation: 0

Joined: 14 Sep 2023
Posts: 8

PostPosted: Thu Sep 21, 2023 9:05 pm    Post subject: Unity's move-mouse handling ignores script Reply with quote

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
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 460

Joined: 09 May 2003
Posts: 25330
Location: The netherlands

PostPosted: Fri Sep 22, 2023 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
caval
How do I cheat?
Reputation: 0

Joined: 14 Sep 2023
Posts: 8

PostPosted: Fri Sep 22, 2023 9:12 pm    Post subject: Reply with quote

Did not notice event for this !
Much thanks, it works Smile

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites