Jump to content

Script to move the camera view


MadMaximus

Recommended Posts

Posted

So guys is there anyway to change the camera view in a map in client side? If so can someone provide me a script which can change the camera view but still follow and target the player so I can change coordinates and use as I want. Or can someone tell me how to script it.

Posted
On 2/2/2017 at 12:03, idarrr said:

setCameraMatrix

 

Yes I know I can set camera position using setCameraMatrix. But what I don't know is how to write the full script. I'm really new to lua.

Posted
function onClientRender( )
	local x,y,z = getElementPosition( localPlayer )
	setCameraMatrix(x, y + 20, z + 2, x, y, z)
end
addEventHandler( "onClientRender", root, onClientRender )

x2EdRA8.png

  • Like 1
Posted
12 hours ago, Yazir said:

function onClientRender( )
	local x,y,z = getElementPosition( localPlayer )
	setCameraMatrix(x, y + 20, z + 2, x, y, z)
end
addEventHandler( "onClientRender", root, onClientRender )

x2EdRA8.png

Thank you so much. It works perfectly... <3

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