Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Vector3 GetCoordsInfrontOfCam(float range)
- {
- Vector3 GameplayCamRot = Function.Call<Vector3>(Hash.GET_GAMEPLAY_CAM_ROT, 2);
- Vector3 GameplayCamCoord = Function.Call<Vector3>(Hash.GET_GAMEPLAY_CAM_COORD);
- float tan = (float)(Math.Cos(GameplayCamRot.X) * range);
- float xPlane = (float)((Math.Sin(GameplayCamRot.Z * -1.0f) * tan) + GameplayCamCoord.X);
- float yPlane = (float)((Math.Cos(GameplayCamRot.Z * -1.0f) * tan) + GameplayCamCoord.Y);
- float zPlane = (float)((Math.Sin(GameplayCamRot.X) * range) + GameplayCamCoord.Z);
- return new Vector3(xPlane, yPlane, zPlane);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement