-.Paradox.- Posted November 20, 2014 Share 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? Link to comment
myonlake Posted November 20, 2014 Share 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 Link to comment
boro Posted November 20, 2014 Share 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 ) Link to comment
myonlake Posted November 20, 2014 Share 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. Link to comment
-.Paradox.- Posted November 20, 2014 Author Share Posted November 20, 2014 Calling onClientPreRender when the player is wasted right? Link to comment
myonlake Posted November 21, 2014 Share 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. Link to comment
TAPL Posted November 21, 2014 Share 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. Link to comment
-.Paradox.- Posted November 21, 2014 Author Share Posted November 21, 2014 Thanks myonlake and Tapl, I got it 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