Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Can someone help me with Camera Rotation Tilt?

Asked by 8 years ago

So I have a script that rotates around a part so that you can see the different sides of the part while it's rotating. Except the camera rotates around it but it is pointed straight forwards. I was wondering if there was a way to change it so the camera rotates around the object but the camera is pointed down a bit towards the object. Here is my script.

01local target = workspace.Part86
02local cam = workspace.CurrentCamera
03 
04cam.CameraSubject = target
05cam.CameraType = "Scriptable"
06 
07local angle = 0
08local speed = 50
09 
10while true do
11    angle=angle+(game:GetService("RunService").RenderStepped:wait()*speed)
12    cam.CFrame = target.CFrame * CFrame.Angles(300,math.rad(angle),0) * CFrame.new(0,0,50)
13end

1 answer

Log in to vote
0
Answered by
Dominical 215 Moderation Voter
8 years ago

Try using the Camera's focus property rather than it's CFrame. The focus property tells the camera what point it should look at. Maybe try manipulating your script using this? http://wiki.roblox.com/index.php?title=API:Class/Camera/Focus

Hope this helps! Appreciate ya! ;)

Ad

Answer this question