Vector3 headPos = player.GetBoneCoords(31086, 0.0f, 0.0f, 0.0f);
Vector3 offsetPos = RAGE.Game.Entity.GetOffsetFromEntityInWorldCoords(player.Handle, 0.0f, 20.0f, -10.0f);
RAGE.Game.Graphics.DrawLine(headPos.X, headPos.Y, headPos.Z, offsetPos.X, offsetPos.Y, offsetPos.Z, 255, 0, 0, 255);
int resultShape = RAGE.Game.Shapetest.StartShapeTestRay(headPos.X, headPos.Y, headPos.Z, offsetPos.X, offsetPos.Y, offsetPos.Z, 1, player.Handle, 7);
int hit = -1;
Vector3 endCoords = new Vector3();
Vector3 surfaseNormal = new Vector3();
int endEndidty = -1;
int result = RAGE.Game.Shapetest.GetShapeTestResult(resultShape, ref hit, endCoords, surfaseNormal, ref endEndidty);
if(result != 0)
RAGE.Game.Graphics.DrawMarker(28, endCoords.X, endCoords.Y, endCoords.Z, 0.0f, 0.0f, 0.0f, 0.0f, 180.0f, 0.0f, 0.2f, 0.2f, 0.2f, 255, 128, 0, 50, false, true, 2, false, null, null, false);