diff options
| author | Ray <[email protected]> | 2017-05-10 00:57:48 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-05-10 00:57:48 +0200 |
| commit | 0880be638e94bafb49aaa7465973716938306145 (patch) | |
| tree | b569418e5b4204f662b1576a015008694b6a2b2f /src/models.c | |
| parent | 7f6b16add4225eb42d85a73fef94ae29b672036d (diff) | |
| download | raylib-0880be638e94bafb49aaa7465973716938306145.tar.gz raylib-0880be638e94bafb49aaa7465973716938306145.zip | |
Renamed RayHitInfo variables
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/models.c b/src/models.c index 2459edf1..0a692f5c 100644 --- a/src/models.c +++ b/src/models.c @@ -1541,11 +1541,11 @@ RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3) result.hit = true; result.distance = t; result.hit = true; - result.hitNormal = VectorCrossProduct(edge1, edge2); - VectorNormalize(&result.hitNormal); + result.normal = VectorCrossProduct(edge1, edge2); + VectorNormalize(&result.normal); Vector3 rayDir = ray.direction; VectorScale(&rayDir, t); - result.hitPosition = VectorAdd(ray.position, rayDir); + result.position = VectorAdd(ray.position, rayDir); } return result; @@ -1568,8 +1568,8 @@ RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight) VectorScale(&rayDir, t); result.hit = true; result.distance = t; - result.hitNormal = (Vector3){ 0.0, 1.0, 0.0 }; - result.hitPosition = VectorAdd(ray.position, rayDir); + result.normal = (Vector3){ 0.0, 1.0, 0.0 }; + result.position = VectorAdd(ray.position, rayDir); } } |
