SweetyWolf Posted November 17, 2014 Posted November 17, 2014 Hello. I am trying to create first person aiming with setCameraMatrix. After some brain work I decided to use getPedTargetStart as coordinates of camera's position and getPedTargetEnd as coordinates of look-at position. addEventHandler('onClientRender', root, function() if getControlState ( "aim_weapon" ) then local x,y,z = getPedTargetStart ( localPlayer ) local xx,yy,zz = getPedTargetEnd ( localPlayer ) setCameraMatrix (x,y,z,xx,yy,zz) was_aiming = true elseif was_aiming then was_aiming = false setCameraTarget ( localPlayer ) end end) But then in aim mode player's camera continuously moving up and right: How to make player's camera stand still and move only when player moves the mouse?
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