XtReLL Posted January 28, 2021 Share Posted January 28, 2021 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 comment Share on other sites More sharing options...
Kopra Posted January 30, 2021 Share Posted January 30, 2021 Yes it is possible, it is called player heading. Player::heading - RAGE Multiplayer Wiki Entity::getRotation - RAGE Multiplayer Wiki Link to comment Share on other sites More sharing options...
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