Skip to content

Commit

Permalink
Merge branch 'Release-0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
STREGA committed Apr 24, 2024
2 parents 0c75de5 + a1755c9 commit a40ce90
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public final class MeshCollider: Collider3D {
for triangle in transformedTriangles {
positions.append(contentsOf: triangle.positions)
}

boundingBox = AxisAlignedBoundingBox3D(positions)
}
return transformedTriangles
Expand All @@ -38,6 +39,10 @@ public final class MeshCollider: Collider3D {
didSet {
if transform != oldValue {
needsUpdate = true

//TODO: This update should account for rotation changes
// When triangles are updated a new perfect box is created
self.boundingBox.update(transform: transform)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public struct OrientedBoundingBox3D: Collider3D, Sendable {
self._offset = offset
self._radius = radius
self.radius = _radius
self.boundingBox = AxisAlignedBoundingBox3D(center: center, offset: offset, radius: radius)
// TODO: radius * 2 is probably overkill. Figure out the exact max radius.
self.boundingBox = AxisAlignedBoundingBox3D(center: center, offset: offset, radius: radius * 2)
}

@inline(__always)
Expand Down
1 change: 1 addition & 0 deletions Sources/GateEngine/Resources/Text/Text.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ public final class Text {
#else
self.interfaceScale = 1
#endif
self._geometry = MutableGeometry(rawGeometry: nil)
}

@MainActor private static func rawGeometry(
Expand Down

0 comments on commit a40ce90

Please sign in to comment.