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.
01 | local target = workspace.Part 86 |
02 | local cam = workspace.CurrentCamera |
03 |
04 | cam.CameraSubject = target |
05 | cam.CameraType = "Scriptable" |
06 |
07 | local angle = 0 |
08 | local speed = 50 |
09 |
10 | while 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 ) |
13 | end |
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! ;)