Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

"Scriptable" camera mode issues.

Asked by
TomsGames 225 Moderation Voter
10 years ago

Hi guys!

Right, so I usually use the default "watch" camera mode with camera manipulation, but I think it's time to make my camera more professional and turn it scriptable since players can move the camera about if it's not scriptable, and I don't want that.

This is the current script I use when it is NOT scriptable:

    while rot.Value do
        wait()
        cam.CameraSubject = targ
        cam.CoordinateFrame = CFrame.new(targ.Position) * CFrame.Angles(0, angle, 0) * CFrame.new(0, 10, -30)
        angle = angle + math.rad(1)
    end

This works absolutely fine when it isn't scriptable, but when I turn it scriptable all hell breaks loose. I don't really understand what's happening, and I can't find any in depth guide anywhere. Please can someone either give me a tutorial or make the script work the same way except for scriptable camera types? Thanks a lot!

Tom

1 answer

Log in to vote
0
Answered by
samfun123 235 Moderation Voter
10 years ago

I'm not positive this works but, I think your problem is that when the CameraType is being set to Scriptable the direction of the camera is being set to the wiki had this on the CoordinateFrame page " If the camera type is Scriptable, it also sets the direction the camera faces." By that logic you might want to try to set the Focus to the targets head position.

Ad

Answer this question