I have a third person camera, and it currently locks the player from zooming in or out, and it also makes the person follow where the mouse is going. What i need now is to make the mouse lock at one position on the screen. How would i start ? Here is the Cam script
01 | local abs = math.abs |
02 |
03 | local distance = 5 |
04 | local zoom = 70 |
05 | local sensitivity = 0.25 |
06 | local height = 1 |
07 |
08 | local player = game.Players.LocalPlayer |
09 | local mouse = player:GetMouse() |
10 | local camera = Workspace.CurrentCamera |
11 |
12 | while not camera do |
13 | Workspace.Changed:wait() |
14 | camera = Workspace.CurrentCamera |
15 | end |
I will give a really short but final answer, as there ain't really other things to say. It is currently impossible to lock your mouse in a position.
However, as what I would consider a very, very hackish method is to equip a tool (this to get the "tool mouse" ) and set the icon to a complete transparant (invisible) image. Now you can use a GUI (or image label) to create a mouse cursor which you can "lock" by not moving the GUI itself around.
Please note that in that case the normal mouse will still work. You will also have to change how the camera works.
In theory this is possible, but I am afraid that this will look really bad in practice.