Kinda week 2

This commit is contained in:
2024-10-02 12:29:02 +02:00
parent 254a796fac
commit de2e9704c5
8 changed files with 210 additions and 156 deletions

View File

@@ -53,8 +53,8 @@ namespace dae
{
float dot = Vector3::Dot(plane.normal, ray.direction);
if(dot < 0) {
float t = Vector3::Dot(plane.origin - ray.origin, plane.normal) / dot;
// float t = Vector3::Dot(plane.origin - ray.origin, plane.normal) / dot;
float t = Vector3::Dot(plane.origin - ray.origin, plane.normal) / Vector3::Dot(ray.direction, plane.normal);
bool hit = t >= 0;
if(hit && !ignoreHitRecord){