TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 12 Jan 2014 02:29 PM |
This is what I have:
function Spectate() camera.CameraSubject = game.Workspace.Elevator.CamSubject camera.CoordinateFrame = CFrame.new(game.Workspace.Elevator.Camera.Position) camera.Focus = CFrame.new(-1, 3, 21.8) camera.CameraType = "Scriptable" end
Yes, it gets called.
My problem? The focus part doesn't do anything. No errors, but the camera doesn't focus on the CFrame listed above.
Any ideas? |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
| |
|
|
| 12 Jan 2014 02:45 PM |
try camera.CameraSubject = a part at the position |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 12 Jan 2014 02:50 PM |
I did this:
camera.CameraSubject = game.Workspace.Elevator.CamSubject.Position
That errored...
I also did this:
camera.CameraSubject = (game.Workspace.Elevator.CamSubject.Position)
Same problem... |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
| |
|
|
| 12 Jan 2014 03:03 PM |
Where did you get the camera value from? I'm pretty sure you should include
function Spectate(camera) |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 12 Jan 2014 03:04 PM |
Oh, sorry.
I have this too:
local camera = game.Workspace.CurrentCamera |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 03:05 PM |
| This is in a localscript, correct? |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
| |
|
|
| 12 Jan 2014 03:07 PM |
| Ayyye I see your problem, you set the scriptable camera type AFTER you defined your values. Roblox won't do anything if it's not scriptable and it won't error. |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 12 Jan 2014 03:10 PM |
I have no idea what you are getting at there. I put camera.CameraType = "Scriptable" above everything (right below the function) and still the same problem. I don't think I have to say the camera type before... |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
|
| 12 Jan 2014 03:17 PM |
The thing that doesn't work is the Focus.
It won't focus the camera to the coordinates. |
|
|
| Report Abuse |
|
|
|
| 12 Jan 2014 03:23 PM |
Oh what a ding-dong I am, CFrame is not an acceptable value for the focus, you need to have a vector3 value, hence
camera.Focus = Vector3.new(-1, 3, 21.8) |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
| |
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
| |
|
|
| 12 Jan 2014 03:44 PM |
With the Scriptable camera type, you don't get to use Focus/CameraSubject.
~LuaWeaver; Programmer, gamer, developer. |
|
|
| Report Abuse |
|
|
TheJKM98
|
  |
| Joined: 20 Dec 2010 |
| Total Posts: 511 |
|
| |
|