|
| 03 Feb 2015 09:47 AM |
Is there a way to do such a thing? I know that there are properties for it, but they only work when I use the custom camera.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
|
| 03 Feb 2015 10:35 AM |
Somewhere inside the player properties, player. CameraMaxDistance or something |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:35 AM |
No, just script your own camera.
⬡ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:38 AM |
Scripting my own camera isn't an option right now, as I need to lock the player's mouse in the center of the screen without jitter, which isn't possible with the methods I know of. Although it's possible to lock the mouse in a scriptable camera, it's not efficient. There has to be a way to remove the ability to zoom in/out or cap the distance. If I can remove the ability to zoom while keeping it a Track camera, I can script my own zoom.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:39 AM |
@park
CameraMaxDistance only works with Custom cameras apparently.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
|
| 03 Feb 2015 10:39 AM |
| As i told somewhere inside the player properties |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:41 AM |
game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
km8
⬡ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:41 AM |
The property doesn't affect the camera when it's not a "Custom" camera. I'm using a "Track" camera, so that property is of no use to me.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
| |
|
|
| 03 Feb 2015 10:42 AM |
lolwat
I've been using it with a scriptable camera since forever
⬡ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:42 AM |
@Devious
I will play with that, yet I think I've had issues with LockCenter in the past.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:43 AM |
Oh, you weren't talking to me, lol
⬡ |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:43 AM |
also, that last post was meant for park.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:43 AM |
This thread is a mess lol.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 10:43 AM |
It only has occasional problems in studio, it works fine online.
⬡ |
|
|
| Report Abuse |
|
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
| |
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 03 Feb 2015 10:44 AM |
Don't know exactly how it would work off the top of my head, but try something like this:
When the CoordinateFrame of the Camera changes, calculate the magnitude of the distance between the Camera's CoordinateFrame and the Camera's Focus. If the calculated value is greater than the set limit, adjust the Camera's CoordinateFrame towards the Focus so that the new distance is equal to the limit. You should be able to use CoordinateFrame.lookVector for the direction to move the CoordinateFrame. |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 11:01 AM |
I'm not sure if I'm going to use MouseBehavior.LockCenter, as it seems almost impossible to make a decent First Person camera with it. Without constant looping, you can't move your mouse around for the camera to follow.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 03 Feb 2015 11:05 AM |
| Hm... It seems to me you're going for a custom made FirstPersonLock-type system, yes? I don't see any use in having the mouse locked to the center if you weren't. If I'm right, why not just use FirstPersonLock like normal?If I'm wrong, mind explaining exactly what you're trying to do? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 11:06 AM |
Although, if you do know a way to make a decent first person camera with scriptable, please share how you do so, because all I've been able to do is make a poorly-made camera that jitters all over the place.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 11:06 AM |
@MM
Go here and you will understand what I'm doing: http://www.roblox.com/Articulated-Character-Showcase-place?id=209459102
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 11:09 AM |
I have the camera set up already with Track, so I think I'll go with CFrame methods or some temporary "blindness" gui for the time being.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
MM233
|
  |
| Joined: 19 Jun 2008 |
| Total Posts: 925 |
|
|
| 03 Feb 2015 11:31 AM |
| I see, very interesting. Though I'm still unsure of what you're trying to do with the camera. I suppose you're wanting the character to face the camera direction even in third person view, correct? What is the reason for locking the mouse to the center of the screen? |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 11:36 AM |
The camera is behaving as it should already, I just want to cap the distance that you can zoom out. Locking the mouse is to keep the player looking where their mouse is, that's it. It is then unlocked when opening inventory or interacting with stuff.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2015 11:37 AM |
I like the method of using a Track camera as well, because I can also use it to make an artificial "Mouselock" camera, where the camera is over the player's shoulder.
( ͡ಠ ͜ʖಠ) |
|
|
| Report Abuse |
|
|