XtReLL 0 Posted January 28 Share Posted January 28 Good day, friends. Please tell me if it is possible and how to determine the direction of the player. In the documentation, I found only the definition of the camera direction(https://wiki.rage.mp/index.php?title=Camera::getDirection), but I would like to know how to determine where the player model is looking. I attach the implementation of determining the direction of the camera. client-side let getDirection = function () { const camera = mp.cameras.new("gameplay"); let position = camera.getDirection(); console.log(position); mp.gui.chat.push(`Direction: X:${position.x} Y:${position.y} Z:${position.z}`); } mp.events.add('dir', getDirection) server-side mp.events.addCommand('dir', (player) => { player.call("dir"); }); Link to post Share on other sites
Kopra 5 Posted January 30 Share Posted January 30 Yes it is possible, it is called player heading. Player::heading - RAGE Multiplayer Wiki Entity::getRotation - RAGE Multiplayer Wiki Link to post Share on other sites
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