Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

C# SetCursorPosition not working in a game

I trying to change the gun target using this code

Cursor.Position = new Point(20,20);

Its working on my desktop but cursor is does not change on a game.
How can i change my cursor position in a 3d game?

Game Window

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Edit:
As a result of research, SetCurusorPos is not working owing to anti-cheat system.
Valorant vanguard is not allowed to external mouse moves

>Solution :

Valorant, the game you’re trying to change the cursor with, is ran as an elevated process with anti cheat, it probably hooked the mouse and prevented outside modification. Try running Visual Studio as administrator and debug your app.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading