|
Yea i'm no expert when it comes to CFraming. But basically I want to somehow allow the camera to zoom in from its initial location.
Everytime the character presses "p" I tried this.
PlayerDriver.myCamera.CoordinateFrame = workspace.Part.CFrame * CFrame.new(0,2,0)
But it isn't working the way I want. Is there like any formula I can use to allow smooth camera zooming? |
|
|
If you want to "zoom" in, you could try FieldOfView.
If you just want to move forwards, I don't know. |
|
lordramboJoin Date: 2009-06-16 Post Count: 20628 |
camera.CoordinateFrame = character.Head.CFrame * CFrame.new(0, 0, -math.abs(camera.CoordinateFrame.Z - character.Head.CFrame.Z) - 5)
That might work if you defined camera and character. |
|
|
@lordrambo
The camera doesn't move anywhere. Seems like nothing happens. |
|
lordramboJoin Date: 2009-06-16 Post Count: 20628 |
You might not be able to write to CoordinateFrame while the CameraType is not "Custom". Also it should have been
camera.CoordinateFrame = character.Head.CFrame * CFrame.new(0, 0, -math.abs(camera.CoordinateFrame.Z - character.Head.CFrame.Z) + 5) |
|
MrEpic534Join Date: 2012-05-12 Post Count: 1349 |
Try using a for loop also
if you want it to pan around something i think use this (local script)
player = game.Players.LocalPlayer
cam = game.Workspace.Camera
cam.CameraType = "Scriptable"
pos = the position you want like how you want it to pan around
Targ =the position you want like how you want it to pan around
pos = the position you want like how you want it to pan around
(Use a vector3 value)
Targ = The thing you want to pan around
f = -50
Zoom = 80
for i = 1, 100 do
Zoom = Zoom - 1
cam.FieldOfView = Zoom
f = f + 1
pos = Vector3.new(0, 50, f)
cam.CoordinateFrame = CFrame.new(pos, Targ)
run.Stepped:wait(0.1)
end
cam.FieldOfView = 70
cam.CameraType = "Custom" |
|
|
I have no idea, but the camera is "Custom", I set it to "Scriptable" but that made it even worse. I tried it again but the camera still moves no where. I printed it to the screen and it just prints the same CFrame value over and over. |
|
lordramboJoin Date: 2009-06-16 Post Count: 20628 |
If you take the camera off of custom it won't move with the character like usual. Probably not what you intended to do. |
|
MrEpic534Join Date: 2012-05-12 Post Count: 1349 |
Have you tried my option? |
|
|
@MrEpic534
I tried yours but it literally pans in. I basically have set the camera subject to something else. I'm just trying to replicate how the orginal camera is like when the camera is set to the humanoid.
Currently the CameraSubject is set to a part in Workspace. |
|
MrEpic534Join Date: 2012-05-12 Post Count: 1349 |
ok do you know how to make a loading gui?
if so put a wait(11) at the begging of my cam script
then on the loading script put it so that after 11 seconds the gui remove use a Image label and set the scale(s) to 1 then remove the gui after 11 seconds idk why i think its a problem to do with characterloading
please feed back thanks ! :) |
|
|
I don't know what a GUI has to do with this. All I want is to have a normal camera like the player has except on a custom part. |
|
|
What? Can't you use a normal camera type on a part?
Like Watch, Follow, Attach, or Track?
I would think it to work that way. |
|
|
Thank you sir, "Follow" worked. Wow I should of totally tried that before.. |
|