XDecoder
|
  |
| Joined: 11 Mar 2013 |
| Total Posts: 12 |
|
|
| 12 Mar 2013 11:07 PM |
The script is working just not the way i want it to. First of all, the camera isnt rotating as it is scripted to, I want the script to not allow any camera movement but it lets it go up and down, and after the amount of time the camera is manipulated, it is supposed to allow the player take control of his camera again after that but its not allowing it. why is this happening?
local cam = workspace.CurrentCamera cam.CameraSubject=workspace.Part cam.CameraType = "Attach" cam.CoordinateFrame=CFrame.new(117, 28.5, -64) cam.Focus=CFrame.new(113, 9.5, -19)
local target = workspace.Part local camera = workspace.CurrentCamera Camera.CameraSubject = target local angle = 45 while wait(1) do camera.Coordinateframe = Cframe.new (target.possition) * Cframe.angles (1, angle, 45) * Cframe.new (10, 105.7, -9) angel = angle + math.rad(1) end wait (4) game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom" |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 13 Mar 2013 01:05 AM |
| Use camera type Scriptable, then rotate it, by rotating CoordinateFrame property. |
|
|
| Report Abuse |
|
|
DoctorEvo
|
  |
| Joined: 22 Apr 2008 |
| Total Posts: 199 |
|
|
| 13 Mar 2013 02:51 AM |
//"The script is working just not the way i want it to. First of all, the camera isnt rotating as it is scripted to, I want the script to not allow any camera movement but it lets it go up and down,"// Yeah, unfortunately, that's just the way the "Attach" CameraType works. Pretty useless, IMO. When I think of an "attached" camera, I think of a camera that's literally attached to the part, that moves and tilts with that part just like you would expect of an "attached" camera. That would be infinitely more useful too, I think.
But judging by your script (since you're not even using a CameraSubject), you'll get what you're looking for if you switch to "Scriptable."
//"and after the amount of time the camera is manipulated, it is supposed to allow the player take control of his camera again after that but its not allowing it. why is this happening?"// Hmm... tough one.
Is the output clear? |
|
|
| Report Abuse |
|
|