Jump to content

Diffrent Camera


#BrosS

Recommended Posts

Posted

Hello,

Who's it going bros my name's PEEEWDIEEPIEE ,kidding

I have a login panel and i want to use diffrent camera ..

Example , setcameramatrix for a place and after 5 secs the camera pos change and another 5 changes ,

Would you please help

Posted
cameras = {
  {x, y, z, rx, ry, rz};
  {x, y, z, rx, ry, rz};
  {x, y, z, rx, ry, rz};
}

local Cameramode = 0
function cameraHandler(
  enablecam = true
  timer = setTimer(function()
      if enablecam == true then
      if Cameramode == #cameras then
        Cameramode = 1
      else
        Cameramode = Cameramode + 1
      end
      setCameraMatrix(cameras[Cameramode][1], cameras[Cameramode][2], cameras[Cameramode][3], cameras[Cameramode][4], cameras[Cameramode][5], cameras[Cameramode][6])
  else
     killTimer(timer)
  end
  end, 5000, 0)
end

Add this to your script.

Change x, y, z, rx, ry, rz to your camera coordinates.

When you want to enable camera, add cameraHandler() to your script.

and when you want to disable camera, add this to your code: enablecam = false

 

Btw, haven't tested, because I wrote this all on phone. :D

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...