generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Keeping mouse centered

Previous Thread :: Next Thread 
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
12 Aug 2013 05:41 AM
Is there a possible way to keep your mouse in the center of your screen with the CameraType of Scriptable? I'm making my own 'hacky' camera and this would improve it greatly.
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
12 Aug 2013 05:43 AM
LockFirstPerson?
Report Abuse
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
12 Aug 2013 05:46 AM
It doesn't work with the Scriptable cameratype, also I have to get the mouse delta.
Report Abuse
Looah is not online. Looah
Joined: 22 Feb 2013
Total Posts: 922
12 Aug 2013 05:51 AM
infinite loop
{
set cameratype to custom
lockfirstperson
set cameratype to scriptable
--do stuff
}

?
Report Abuse
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
12 Aug 2013 06:07 AM
Nope..
Report Abuse
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
12 Aug 2013 06:08 AM
If anyone knows about the MouseDelta property in the wiki please let me know.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
12 Aug 2013 06:22 AM
[ Content Deleted ]
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
12 Aug 2013 06:35 AM
If you're trying to 'do' third-person locked camera, I know a way without Scriptable.....
Report Abuse
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
12 Aug 2013 06:48 AM
Mouse would be centered and I would be able to get some sort of mouse delta? I mean, just go ahead.
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
12 Aug 2013 06:55 AM
Don't think it's what you want.
Report Abuse
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
12 Aug 2013 08:26 AM
If there's no real solution to this, please, staff, make the MouseDelta property work. I don't know if it exists but it's on the wiki page. Or just make us able to manipulate our mouse.
Report Abuse
trappingnoobs is not online. trappingnoobs
Joined: 05 Oct 2008
Total Posts: 19100
12 Aug 2013 09:03 AM
The way most games do it is render a fixed cursor in the middle and hide the normal mouse cursor, tracking it's movements, and occasionally resetting it to the centre so you don't hit the edges. You may see this effect visibly in some FPSs if you accidentally glitch it to display the mouse cursor.

Unfortunately, we (to my knowledge insofar) can't do this technique here, but if they ever implement a way of setting the mouse position, this is the approach you would most likely want to take.
Report Abuse
Bokken is not online. Bokken
Joined: 10 Jan 2010
Total Posts: 194
12 Aug 2013 09:31 AM
If it's for aesthetic purposes you could set the cursor's icon to a null texture and instance a GUI object in it's place. If it's to make your life easier for camera movement.. Nope
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
13 Aug 2013 06:59 AM
My way is at my place. It's really only useful for third-person camera.
Report Abuse
blobbyblob is not online. blobbyblob
Joined: 29 Oct 2008
Total Posts: 12165
13 Aug 2013 12:22 PM
Hehe, take a look at this.
http://www.roblox.com/Custom-First-Person-Camera-item?id=109009588

It's super hacky. It uses the scriptable camera type iirc, and it uses these tricks (resetting the mouse to the center). I think it still occasionally "jumps" where you notice the camera flicker.
Report Abuse
Kirbykid02 is not online. Kirbykid02
Joined: 18 May 2009
Total Posts: 2671
13 Aug 2013 12:38 PM
Mine has options :o
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
13 Aug 2013 12:40 PM
everyone is over complicating everything.

just make the mouse.Icon invisible and then have an image label in the middle of the screen which has the original mouse ico-

OH WAIT, :GetMouse().Icon still doesn't work.
Report Abuse
xSoulStealerx is not online. xSoulStealerx
Joined: 07 May 2008
Total Posts: 1624
14 Aug 2013 12:07 AM
xSIXx, what to do when the mouse goes over the window border..? That might just be the real problem I'm having here.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
14 Aug 2013 12:18 AM
[ Content Deleted ]
Report Abuse
SpleenYanks is not online. SpleenYanks
Joined: 24 Aug 2008
Total Posts: 921
14 Aug 2013 12:38 AM
Maybe make it so that the script doesn't run until you manually move the mouse to around the center of the screen? :P
Report Abuse
xXxkarlxXx is not online. xXxkarlxXx
Joined: 05 Feb 2009
Total Posts: 269
14 Aug 2013 05:49 AM
^
Overrated. It would suck hotdogs.
Report Abuse
MilesJDCRAFT is not online. MilesJDCRAFT
Joined: 10 Feb 2016
Total Posts: 432
20 Jan 2017 03:51 PM
I personally dont know how,but you DEFINETLY NEED THIS EVENT.
local runservice = game:GetService('RunService')
runservice.RenderStepped:connect:function()
--Mouse code here....
end


aaaa
Report Abuse
FroobTown is not online. FroobTown
Joined: 27 Mar 2011
Total Posts: 7
10 Aug 2017 01:23 PM
Do you mean shiftlock?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image