|
| 18 Mar 2017 05:16 PM |
End goal: - User can't look "up" to see what is above them - User can't zoom out too far
Do not want to do: - Restrict all free camera movement - Create a "2D" view - Force first-person
Reasoning: - Creating a large adventure game with many areas - Trying to create an "open-world" feel (Still utilizing nature and terrain, I don't want everything to be enclosed - Would ruin the feel if the user zooms out and sees another area - Would ruin the feel if the user looks up and sees an area above them
I don't know where to begin making this. I have a lot of experience scripting and I've worked with the camera before, but this isn't something I know how to do. Any advice/help/examples? |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 18 Mar 2017 05:17 PM |
I don't like you, Revisional. I don't know why, and I don't know how.
But you will always know...
I'm not fond of you.
R$111,506 and climbing. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 18 Mar 2017 05:35 PM |
| in a renderstepped, check the camera's CFrame.lookVector and see if the y coordinate is greater than a certain amount. If so, reset it |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2017 05:36 PM |
| By which I mean change the Cameras CFrame to look forward |
|
|
| Report Abuse |
|
|
|
| 18 Mar 2017 05:42 PM |
Tested it try this:
use 0.7 instead
print("Hello world!") local cam = workspace.CurrentCamera
game["Run Service"].RenderStepped:Connect(function() print(cam.CFrame.lookVector.y) if cam.CFrame.lookVector.y > 0.7 then cam.CFrame = CFrame.new(cam.CFrame.p,Vector3.new(0,0,0)) end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 18 Mar 2017 05:54 PM |
Np
as per the zoom distance set that by clicking of starterplayer and check the properties window and set the properties there. |
|
|
| Report Abuse |
|
|