Fabio132 Posted January 29, 2021 Share Posted January 29, 2021 (edited) . Edited September 2, 2023 by Fabio132 Link to comment Share on other sites More sharing options...
Kopra Posted January 30, 2021 Share Posted January 30, 2021 Take a look at these functions, they may help you: Player::getEntityIsFreeAimingAt - RAGE Multiplayer Wiki Player::taskLookAt - RAGE Multiplayer Wiki Link to comment Share on other sites More sharing options...
Fabio132 Posted January 30, 2021 Author Share Posted January 30, 2021 (edited) vor 4 Stunden schrieb Kopra: Take a look at these functions, they may help you: Player::getEntityIsFreeAimingAt - RAGE Multiplayer Wiki Player::taskLookAt - RAGE Multiplayer Wiki Thanks Man but thats not for getting its setting and the Free Aiming is for shooting with weapon Edited January 30, 2021 by Fabio132 Link to comment Share on other sites More sharing options...
Kopra Posted January 30, 2021 Share Posted January 30, 2021 Okay but did you try with player.Heading? Player::heading - RAGE Multiplayer Wiki It says here that it returns facing angle in degree, but I'm not sure how accurate that is but I think that you will have to experiment yourself because I can not find any default functions like you described in first post. Link to comment Share on other sites More sharing options...
Fabio132 Posted January 30, 2021 Author Share Posted January 30, 2021 vor 6 Minuten schrieb Kopra: Okay but did you try with player.Heading? Player::heading - RAGE Multiplayer Wiki It says here that it returns facing angle in degree, but I'm not sure how accurate that is but I think that you will have to experiment yourself because I can not find any default functions like you described in first post. Yeah, it seems like it doesn't exists a function like that. But thanks for your help. 1 Link to comment Share on other sites More sharing options...
offsetx Posted February 5, 2021 Share Posted February 5, 2021 you can use Raycasting here's a example on wiki https://wiki.rage.mp/index.php?title=Raycasting::testPointToPoint function pointingAt(distance) { const camera = mp.cameras.new("gameplay"); // gets the current gameplay camera let position = camera.getCoord(); // grab the position of the gameplay camera as Vector3 let direction = camera.getDirection(); // get the forwarding vector of the direction you aim with the gameplay camera as Vector3 let farAway = new mp.Vector3((direction.x * distance) + (position.x), (direction.y * distance) + (position.y), (direction.z * distance) + (position.z)); // calculate a random point, drawn on a invisible line between camera position and direction (* distance) let result = mp.raycasting.testPointToPoint(position, farAway, null, 17); // now test point to point - intersects with map and objects [1 + 16] return result; // and return the result ( undefined, if no hit ) } 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