Jump to content

Camera stuff..


Recommended Posts

Here, use this:

local frame = 0 
local goingRight = true 
local goingLeft = false 
function rotateCamera( ) 
     
    if frame <= 400 and goingRight then 
         
        local a, b, c, d, e, f = getCameraMatrix() 
        setCameraMatrix(a, b, c, d + 0.2, e + 0.2, f) 
     
    elseif frame <= 200 and goingLeft then 
         
        local a, b, c, d, e, f = getCameraMatrix() 
        setCameraMatrix(a, b, c, d - 0.2, e - 0.2, f) 
    end  
     
    frame = frame + 1 
    if frame == 400 and goingRight then 
             
        goingRight = false 
        goingLeft = true 
        frame = -400 
    elseif frame == 200 and goingLeft then 
             
        goingRight = true 
        goingLeft = false 
        frame = -200 
    end 
end 

And add this in the function where you render your login panel:

addEventHandler("onClientRender", getRootElement(), rotateCamera) 

Don't forget to use removeEventHandler when you remove your login panel.

Link to comment

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...