Recover and verify static collision traversal and body contracts

This commit is contained in:
UnixNight committed 2026-10-26 21:45:57 -04:00
1 parent 7c0d1a4b0c
commit df0263b26e
34 files changed
+1962 -17

No files matched your search

+2 -2
View File
@@ -4,7 +4,7 @@ using GamePort.Assets;
namespace GamePort.Game;
public readonly record struct CameraRayPolygon(SupportTriangle Triangle, Vector3 StoredNormal,
string? ShapeName = null, string? MaterialName = null);
string? ShapeName = null, string? MaterialName = null, int? MaterialId = null);
public readonly record struct CameraRayResult(Vector3 Eye, float Gain, SupportHit? Hit);
/// <summary>
@@ -77,7 +77,7 @@ public sealed class OriginalCameraRay
if (a >= mesh.Vertices.Length || b >= mesh.Vertices.Length || c >= mesh.Vertices.Length)
throw new InvalidDataException("Camera triangle index outside vertex table");
polygons[i] = new(new(mesh.Vertices[a].Position, mesh.Vertices[b].Position, mesh.Vertices[c].Position,
source.ShapeId, source.PolygonIndex), source.Normal, source.ShapeName, source.MaterialName);
source.ShapeId, source.PolygonIndex), source.Normal, source.ShapeName, source.MaterialName, source.MaterialId);
}
return new(polygons);
}