MAB Posted October 10, 2015 Share Posted October 10, 2015 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
KariiiM Posted October 10, 2015 Share Posted October 10, 2015 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) Link to comment
t3wz Posted October 10, 2015 Share Posted October 10, 2015 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
MAB Posted October 11, 2015 Author Share Posted October 11, 2015 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now