Page 1 of 1

Roblox Turning, camera turning/rotating.

Posted: 14 Mar 2024, 22:15
by Seth_Nooby1
So basically in Roblox, there are a couple ways to turn or rotate. You either hold down right mouse button and move the mouse to rotate or press shift to activate shiftlock and move the mouse to rotate.
But either way still make the cursor in the same position so when writing a code you can't use a screen position to assign movement.
I never wrote a script or AHK script before but I did some research and found out that I have to use DllCall but it was so hard to understand.
Any other way to fix this problem or explaination of using DllCall in simple way would be a pleasure for me.
Thank you in advance.

Re: Roblox Turning, camera turning/rotating.

Posted: 15 Mar 2024, 02:57
by Banaanae
What exactly are you trying to do?
I get you want to move the camera but to achieve what?
You're also posting in the (deprecated) AHK v1 forum, you may want to use AHK v2

Re: Roblox Turning, camera turning/rotating.

Posted: 15 Mar 2024, 08:18
by Seth_Nooby1
Banaanae wrote:
15 Mar 2024, 02:57
What exactly are you trying to do?
I get you want to move the camera but to achieve what?
You're also posting in the (deprecated) AHK v1 forum, you may want to use AHK v2
In my current first project I just want to turn around but I also want to understand how it works for future use.
I'm also using v1

Re: Roblox Turning, camera turning/rotating.

Posted: 17 Mar 2024, 03:34
by Banaanae

Code: Select all

speed := 10

up:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", -speed)
down:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", 0, "Int", speed)
left:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", -speed, "Int", 0)
right:: DllCall("user32.dll\mouse_event", "UInt", 0x0001, "Int", speed, "Int", 0)
This script moves the mouse 10px in the direction of the arrow key
Change speed to change how far the camera is moved.

The first Int is x and the second Int is y (relative)