CliffHanger Posted February 2, 2017 Share Posted February 2, 2017 I'm trying to make peds turn to a specific coord immediately. AI::TASK_TURN_PED_TO_FACE_ENTITY technically does what I want, but the ped will animate and turn around; the effect is not immediate like I need it to be. I assume Quaternion maths will be needed... but maybe a native does this? Link to comment Share on other sites More sharing options...
uNiverselEgacy Posted February 2, 2017 Share Posted February 2, 2017 Are you talking about SET_ENTITY_HEADING? Link to comment Share on other sites More sharing options...
jedijosh920 Posted February 2, 2017 Share Posted February 2, 2017 Here's the function that I use which works perfectly public static void FacePosition(this Ped ped, Vector3 pos) { ped.Heading = Function.Call<float>(Hash.GET_HEADING_FROM_VECTOR_2D, pos.X - ped.Position.X, pos.Y - ped.Position.Y); } CliffHanger and RubySent 2 Link to comment Share on other sites More sharing options...
CliffHanger Posted February 2, 2017 Author Share Posted February 2, 2017 Perfect, thanks! 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