norby89 Posted February 15, 2008 Share Posted February 15, 2008 It still seemed wrong even in that case when I used it.Like say you jumped on the front of the car it'd glue you a metre off the left of it or something similar. I fixed it by changing the math used but it's strange no-one else has mentioned it. could you post the fixed function so others can update their scripts please? Link to comment
Woovie Posted February 15, 2008 Share Posted February 15, 2008 Yes, please Twig. The other coder for NR has been trying to figure the math out for a long time. Link to comment
Twig Posted February 15, 2008 Share Posted February 15, 2008 local vrZ = math.rad(360 - vrZ) local offsetZ = pZ-vZ local offsetX = math.cos(vrZ)*(pX-vX) - math.sin(vrZ)*(pY-vY) local offsetY = math.sin(vrZ)*(pX-vX) + math.cos(vrZ)*(pY-vY) That works exactly as far as I've seen. Don't expect me to explain it to you If anyone has managed to produce some method of allowing the player to move while on the vehicle without them being thrown off it I'd appreciate a look. 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