Raycast - How to Jump to aim direction?
Re: [[TUTORIAL | C#.NET] How to jump to Aim Positon?
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));
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?