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 » Scripting Helpers
Home Search
 

Re: how to limit the camera distance?

Previous Thread :: Next Thread 
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 02:39 PM
Would it be like
Workspace.CurrentCamera.Distance = 20?
I'm trying to make it so they can't zoom out very far,BUT I DON'T want to set the view to fps..

Help?

TL;DR?

I want to limit the zoom
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
07 Mar 2014 02:46 PM
TBH I don't know, but try learning from this free model

http://www.roblox.com/Camera-Zoom-Limit-item?id=145557981
Report Abuse
powertool is not online. powertool
Joined: 01 Feb 2008
Total Posts: 3771
07 Mar 2014 02:50 PM
I honestly can't help ye there, not from experience. From what I can gather on the wiki, Focus and Magnitude.

tic = 1/60
while wait(tic) do if (CurrentCamera.Focus-CurrentCamera.CFrame.p).Magnitude > 20 then
--Fancy CFrame stuff to limit the camera to 20 studs from focus
end
Report Abuse
StealthKing95 is not online. StealthKing95
Joined: 13 Dec 2008
Total Posts: 4263
07 Mar 2014 02:51 PM
might wanna do this instead:

game:GetService("RunService").RenderStepped:connect(function()
if (CurrentCamera.Focus-CurrentCamera.CFrame.p).Magnitude > 20 then
--Fancy CFrame stuff to limit the camera to 20 studs from focus
end
end)
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 02:53 PM
Oh doi..

Workspace.CurrentCamera.FieldOfView = 20

Will this work?(just looked up field of view,forgot about it lol..)
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
07 Mar 2014 02:57 PM
No the field of view is like changing the curvature of the camera lens so that more of your game occupies the screen.

As fun as it sounds, it really is not a good idea to play around with this property because it can cause dizziness in some people, even fainting if their symptoms are severe enough.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 02:57 PM
Le bump
I can't test right now..is my script correct?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 02:58 PM
@x
What??!?!?!?!?
That doesn't even make sence,I've used fieldofview before,and it seemed to be zoomed in..
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 03:26 PM
Le BUMP
Why has noone answered?
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
07 Mar 2014 03:30 PM
repeat wait() until workspace.CurrentCamera

local cam = workspace.CurrentCamera
function check()
if (cam.CoordinateFrame.p-cam.Focus.p).magnitude < dist then
repeat cam.CoordinateFrame = cam.CoordinateFrame+cam.lookVector--Not too sure about this lookVector
until (cam.CoordinateFrame.p-cam.Focus.p).magnitude < dist
end
repeat check() wait() until nil

INEFFICIENCY AND IDK IF IT WILL WORK
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 03:32 PM
Ah,good ol wazap :D
@wazap

But wouldn't it limit the zoom with Workspace.CurrentCamera.FieldOfView??
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
07 Mar 2014 03:32 PM
Tried that and worked about as great as fighting a firebrand with an ice dagger.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 03:33 PM
The script you made?
Or the fieldofview bit?
Report Abuse
xiaoxiao181 is not online. xiaoxiao181
Joined: 14 Aug 2008
Total Posts: 5882
07 Mar 2014 03:39 PM
Yes island, under very specific circumsances using the FieldOfView property can give the appearance of zooming in. However that only works when there are other elements in the game blocking portions of the view.

game.Workspace.CurrentCamera.FieldOfView


Use this command to adjust your field of view in Edit Mode.

Make sure there are no guis blocking your view. Each time you adjust the field, pan your camera around at 3D objects like parts and meshes. For best example use a map someone else made.

You'll begin to notice how disorienting the field of view is at certain settings. This can and will cause a player's brain to be confused, and even dizzy.

That is why it is smart to use this property only during times that the camera is not rotating around.
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 03:49 PM
Well,all I want is with my game,I want you to not be able to zoom so far out you can see the entire game.............
I want them to have restricted field of view(still able to zoom in and out freely,but not as far..)

And I've used FieldOfView before and I've never seen it do anything like your saying..

One thing tho..
Does the zooming function roblox made(zooming in an out) use fieldofview?
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
07 Mar 2014 04:00 PM
In a game by Rukiryo when you zoom out a lot a black gui covering the screen appears, telling you to zoom in. I think Gecko uses this in his game too ^.^
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 04:04 PM
But I don't want that..I want it to just NOT zoom out any further!!
Having the black gui would kinda ruin my game......
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
07 Mar 2014 04:04 PM
And I DON'T WANT FPS VIEW...
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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