Page MenuHomeFeedback Tracker

RoadSurfaceDetection.CLOSEST doesn't always select actual closest surface
Assigned, NormalPublic

Description

When using GetGame().SurfaceRoadY3D with RoadSurfaceDetection.CLOSEST, the returned Y isn't always that of the actual closest surface.

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Modding
Steps To Reproduce
// On chernarus

float x = 6248.47;
float y = 8.71992;
float z = 2720.07;

float roadY_Above = GetGame().SurfaceRoadY3D(x, y, z, RoadSurfaceDetection.ABOVE);
float roadY_Under = GetGame().SurfaceRoadY3D(x, y, z, RoadSurfaceDetection.UNDER);
float roadY_Closest = GetGame().SurfaceRoadY3D(x, y, z, RoadSurfaceDetection.CLOSEST);

Print(roadY_Above);   // 14.7265
Print(roadY_Under);   // 8.47403  <-- actual closest surface
Print(roadY_Closest);  // 14.7265  <-- 'ABOVE' value, not actual closest surface

Event Timeline

lava76 created this task.Thu, Jun 12, 12:18 PM
Geez changed the task status from New to Assigned.Thu, Jun 12, 2:03 PM