Raycast - How to Jump to aim direction?
-
Re: [[TUTORIAL | C#.NET] How to jump to Aim Positon?
(/topic/12470/tutorial-c-net-how-to-get-aim-positon-or-entity-raycasting-functions)
Someone can tell me how to get ped jumping to Aim Position?//get Aim Postion
Vector3 camPos = Function.Call<Vector3>(Hash.GET_GAMEPLAY_CAM_COORD);
Vector3 camRot = Function.Call<Vector3>(Hash.GET_GAMEPLAY_CAM_ROT);
float retz = camRot.Z * 0.0174532924F;
float retx = camRot.X * 0.0174532924F;
float absx = (float)Math.Abs(Math.Cos(retx));
Vector3 camStuff = new Vector3((float)Math.Sin(retz) * absx * -1, (float)Math.Cos(retz) * absx, (float)Math.Sin(retx));
//AimPostion Result
RaycastResult ray = World.Raycast(camPos, camPos + camStuff * 1000, IntersectOptions.Everything);This is the part of code to get aim position, but i would like to "jump"/move to this position, how can i do this?