|
| 19 Feb 2016 02:24 PM |
Anyone know's how to script a BirdEyeView camera ? Im new in scripting and im not the best with camera...I looked on the wiki but it didn't really helped me. I want to try to do the same thing that's in "Light Bulb".
If anyone can help, thanks !
- Sasuker4444 |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 02:25 PM |
I assume you mean top-down?
Just make a script and/or edit the current CameraScript and CFrame the camera |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 02:28 PM |
put this in a local script:
local offset = Vector3.new(0,40,0) -- change as you see fit local fieldOfView = 30 local player = game.Players.LocalPlayer local camera = game.Workspace.CurrentCamera local runService = game:GetService('RunService') camera.FieldOfView = fieldOfView local function onRenderStep() local playerPosition = player.Character.Torso.Position local cameraPosition = playerPosition + offset camera.CoordinateFrame = CFrame.new(cameraPosition, playerPosition) end runService:BindToRenderStep('Camera', Enum.RenderPriority.Camera.Value, onRenderStep)
#Strikin' |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 02:41 PM |
Everything work's but it doesn't lock your camera in a BirdView... And yes I allready tried to change the camera mode to "Custom" & "Scriptable".
|
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 02:48 PM |
srsly? does the output say anything?
#Strikin' |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 03:00 PM |
That's because you have to disable the default CameraScript inside of PlayerScripts. You can't have 2 camera scripts running at the same time.
|
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 03:06 PM |
this works for me:
local offset = Vector3.new(0,40,0) -- change as you see fit local fieldOfView = 30 repeat wait() until game.Players.LocalPlayer and game.Workspace.CurrentCamera local player = game.Players.LocalPlayer local camera = game.Workspace.CurrentCamera camera.CameraType = "Scriptable" local runService = game:GetService('RunService') camera.FieldOfView = fieldOfView local function onRenderStep() local playerPosition = player.Character.Torso.Position local cameraPosition = playerPosition + offset camera.CoordinateFrame = CFrame.new(cameraPosition, playerPosition) end runService:BindToRenderStep('Camera', Enum.RenderPriority.Camera.Value, onRenderStep)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Feb 2016 03:20 PM |
no, it's obviously mine
-_-
|
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 03:31 PM |
ill assume your being sarcastic -_-
#Strikin' |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 03:46 PM |
| Actually it's in a LocalScript inside StarterGui that's maybe it ? |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 03:47 PM |
| It work I tested it, but my character can't move anyway to fix that ? |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 03:50 PM |
electro, its obviously not your script. also put it in StarterPlayer > PlayerScripts
then add this to the start of the script, if there is a more efficient way hopefully someone helps you.
wait(3) script.Parent.CameraScript:Destroy()
#code print("This signature was created using Roblox+, get yours now at the chrome web store!") |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 03:50 PM |
add that to t he start of electros script.
#code print("This signature was created using Roblox+, get yours now at the chrome web store!") |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 04:36 PM |
for this to work, replace:
local offset = Vector3.new(0,40,0)
with
local offset = Vector3.new(0,40,0.01)
the change in the camera angle is unnoticeable but it will allow your character to move
|
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 04:36 PM |
The reason why your character doesn't move is because when the camera is zoomed out, your character moves based on the looking direction of the camera if you press 'W' or and other key.
Because the camera in this case is only looking down vertically and not inclined on the x or z axis, the character won't move.
|
|
|
| Report Abuse |
|
|
|
| 19 Feb 2016 04:56 PM |
| Thank's it work fine now ! |
|
|
| Report Abuse |
|
|