![]() |
|
[.NET] Emulate mouse movement ingame for the purpose of controlling recoil - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Emulate mouse movement ingame for the purpose of controlling recoil (/showthread.php?tid=5576127) |
Emulate mouse movement ingame for the purpose of controlling recoil - Protótype_ - Mar 15, 2017 How would one achieve this? I've messed about with: Code Cursor.Position = (New Point(MousePosition.X, MousePosition.Y + 5))And this works when not ingame. [In this case Rust, csgo, fullscreen or fullscreen windowed] But when I go ingame, it does not and has no effect. I assume the game is blocking this type of input Has anyone got a solution? - Cheers boyos * - Zilog80 - Mar 15, 2017 It's an assumption, but maybe in game uses Direct Input (from DirectX API) for mouse stuff, and thats is why does not work. Update NVM my previous reply. Try to use mouse_event API instead Cursor C#: PHP Code Bonus-Track: very advadced stuff (you need to know what you are doing) http://pastebin.com/rj4YcW4C Bookmarked for futher uses * - webinjectsformgrabberhvnc - Mar 15, 2017 SendMessage/PostMessage API. Use ilspy++ to read what messages are sent to simulate a mouse click. * - Ainaj - Mar 15, 2017 Most games get their input directly from the mouse driver itself (DirectInput, part of DirectX). I'm not sure of a way to get around that, but most games have an option to disable 'RawInput' such as csgo. * - Menalix - Mar 16, 2017 Use SendInput our the deprecated api mouse_event, will work whether the game is fullscreen or not, and raw input enabled or not. * - Visual Freedom - Mar 16, 2017 A more costy way is to use a microcontroller emulating the mouse. If you are interested, send me a message and I give you all links. * - Protótype_ - Mar 16, 2017 My method works when raw input is off now which is fine in games that have the option to turn raw input off, however I need this for a game that doesn't have the option [Rust] Does anyone have an example of something that could get around this? whether it be sendinput,mouse_event or some other way? Or could someone point me at some documentation of these methods? * - webinjectsformgrabberhvnc - Mar 17, 2017 God damn you're all fucking morons. * - Protótype_ - Mar 17, 2017 (Mar 17, 2017 11:57 AM)webinjectsformgrabberhvnc Wrote: God damn you're all fucking morons. Care to elaborate? * - AnarchyCoder - Mar 19, 2017 Angles to pixels in CS:GO looks like this I believe: Code Public Function AngleToPixel(ByVal viewAngles As Vector3D, ByVal AimAngles As Vector3D) As Vector3DAnd you need to clamp them if you're using ABSOLUTE flag. |