-.Paradox.- Posted November 20, 2014 Posted November 20, 2014 Hi, Is it possible to cancel onPlayerWasted camera view (2D moving camera) and render a new one with setCameraMatrix and attach it to player's bone position?
myonlake Posted November 20, 2014 Posted November 20, 2014 (edited) Simply just render the new camera matrix client-side on death and use the getPedBonePosition function to get the coordinates of a bone. Edited November 20, 2014 by Guest
boro Posted November 20, 2014 Posted November 20, 2014 try this addEventHandler ( "onClientPlayerWasted", root, function () local x,y,z = getElementPosition( source ) local camerax, cameray, cameraz = getCameraMatrix() setCameraMatrix ( x, y, z, camerax, cameray, cameraz ) end )
myonlake Posted November 20, 2014 Posted November 20, 2014 try this addEventHandler ( "onClientPlayerWasted", root, function () local x,y,z = getElementPosition( source ) local camerax, cameray, cameraz = getCameraMatrix() setCameraMatrix ( x, y, z, camerax, cameray, cameraz ) end ) That is not attached to the player's bone position.
-.Paradox.- Posted November 20, 2014 Author Posted November 20, 2014 Calling onClientPreRender when the player is wasted right?
myonlake Posted November 21, 2014 Posted November 21, 2014 Calling onClientPreRender when the player is wasted right? Yes. Make sure to remove the event handler when they spawn again, otherwise they cannot play.
TAPL Posted November 21, 2014 Posted November 21, 2014 Make sure to attach onClientPlayerWasted to localPlayer, because attaching it to root mean that you will be watching anyone die not only yourself.
-.Paradox.- Posted November 21, 2014 Author Posted November 21, 2014 Thanks myonlake and Tapl, I got it
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