Minor tweaks

This commit is contained in:
Wojtek Figat
2024-04-11 16:19:35 +02:00
parent ed732a0189
commit 37a02e3a7e
2 changed files with 5 additions and 4 deletions

View File

@@ -400,13 +400,13 @@ void StaticModel::Draw(RenderContextBatch& renderContextBatch)
bool StaticModel::IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
{
bool result = false;
if (Model != nullptr && Model->IsLoaded())
{
Mesh* mesh;
result = Model->Intersects(ray, _transform, distance, normal, &mesh);
Matrix world;
GetLocalToWorldMatrix(world);
result = Model->Intersects(ray, world, distance, normal, &mesh);
}
return result;
}