Log in to reply

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));
    //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?

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.