Jump to content

setCameraMatrix , onClientResourceStart


MAB

Recommended Posts

The problem is that the camera matrix function is not working.

The screen keeps being blank.

Client :

 local matrixs = { 
{794.07562,-1344.58557,99.22220}, 
{-2469.11304,2291.59033,80.14544}, 
{1803.86255,1500.08813,67.13750} 
} 
  
function onStart () 
local px,py,pz = unpack(matrixs[math.random(1,#matrixs)]) 
showCursor(true) 
setCameraMatrix(px,py,pz,px,py,pz) 
end 
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),onStart)  

Link to comment

Your script works fine here, Use /debugscript 3 to see if the problem isn't on another part of the code.

Also you don't need to use getResourceRootElement(getThisResource()), resourceRoot does the job.

You need two different targets to do that, As i see you're repeating one target two time
setCameraMatrix(px,py,pz,px,py,pz)  

the lookAt* parameters are optional, he doesn't need to pass it.

Link to comment
Your script works fine here, Use /debugscript 3 to see if the problem isn't on another part of the code.

Also you don't need to use getResourceRootElement(getThisResource()), resourceRoot does the job.

You need two different targets to do that, As i see you're repeating one target two time
setCameraMatrix(px,py,pz,px,py,pz)  

the lookAt* parameters are optional, he doesn't need to pass it.

thanks. working now

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