Browse Source

clamp ray hit y position to ground plane height (#1311)

pull/1317/head
seanpringle 4 years ago
committed by GitHub
parent
commit
bdd253a66a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/models.c

+ 1
- 0
src/models.c View File

@ -2862,6 +2862,7 @@ RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight)
result.distance = distance;
result.normal = (Vector3){ 0.0, 1.0, 0.0 };
result.position = Vector3Add(ray.position, Vector3Scale(ray.direction, distance));
result.position.y = groundHeight;
}
}

Loading…
Cancel
Save