|
| 26 Oct 2013 06:29 PM |
I'm working on a cut scene but I have very little experience with manipulating cameras. With help from the wiki, this is what I got: -- player = script.Parent.Parent cam = game.Workspace.CurrentCamera cam.CameraType = "Scriptable" cp = game.Workspace.CameraPart pos = cp.Position cam.CoordinateFrame = CFrame.new(pos) cam.Focus = CFrame.new(game.Workspace.Base2.Position) for i = 160, 1, -1 do cp.CFrame = cp.CFrame - Vector3.new(1, 0, 0) wait(.01) end wait(2) for i = 160, 1, -1 do cp.CFrame = cp.CFrame + Vector3.new(0, 0, 1) wait(.1) end wait(2) for i = 160, 1, -1 do cp.CFrame = cp.CFrame + Vector3.new(1, 0, 0) wait(.01) end wait(2) for i = 160, 1, -1 do cp.CFrame = cp.CFrame - Vector3.new(0, 0, 1) wait(.01) end -- This is supposed to set the camera to Scriptable, and watch a part (game.Workspace.Base2) from the perspective of a part (game.Workspace.CameraPart or cp). Then it moves the part around the baseplate while the camera is still focused on the baseplate's center. Instead, the camera looks straight forward from the brick's perspective. It doesn't focus on Base2 and it doesn't move around with the part. I think the issue is with the CameraType. What should I use instead of Scriptable?
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 26 Oct 2013 06:48 PM |
* CFrame.new*'
Though I have not ever tested: "CFrame + Vector3" |
|
|
| Report Abuse |
|
|
|
| 26 Oct 2013 06:53 PM |
@cnt The problem isn't with the brick. It moves around just fine.
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 26 Oct 2013 07:20 PM |
No one knows?
~ℇℸℇℛηαℒℱίℛℇℇαℸℇℛ~ |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 26 Oct 2013 07:23 PM |
| You want the camera to move or the part..? |
|
|
| Report Abuse |
|
|
MHebes
|
  |
| Joined: 04 Jan 2013 |
| Total Posts: 2278 |
|
|
| 26 Oct 2013 07:24 PM |
1) You need to update the camera EVERY frame the Part moves, not just the once. 2) I don't think Focus works in Scriptable mode. Instead, use this line:
Camera.CoordinateFrame = CFrame.new(pos,game.Workspace.Base2.Position)
To point it at the part. Drop the Focus line. |
|
|
| Report Abuse |
|
|
|
| 26 Oct 2013 07:24 PM |
| I've been trying to help, it keeps blocking me out claiming I've broken a rule. I'll PM my post to you. |
|
|
| Report Abuse |
|
|