Revamped collision system
This commit is contained in:
@@ -58,6 +58,7 @@ namespace SplashEdit.RuntimeCode
|
||||
// Component arrays
|
||||
private PSXInteractable[] _interactables;
|
||||
private PSXAudioSource[] _audioSources;
|
||||
private PSXTriggerBox[] _triggerBoxes;
|
||||
|
||||
// Phase 3+4: World collision and nav regions
|
||||
private PSXCollisionExporter _collisionExporter;
|
||||
@@ -120,6 +121,7 @@ namespace SplashEdit.RuntimeCode
|
||||
// Collect components
|
||||
_interactables = FindObjectsByType<PSXInteractable>(FindObjectsSortMode.None);
|
||||
_audioSources = FindObjectsByType<PSXAudioSource>(FindObjectsSortMode.None);
|
||||
_triggerBoxes = FindObjectsByType<PSXTriggerBox>(FindObjectsSortMode.None);
|
||||
|
||||
// Collect UI image textures for VRAM packing alongside 3D textures
|
||||
PSXUIImage[] uiImages = FindObjectsByType<PSXUIImage>(FindObjectsSortMode.None);
|
||||
@@ -164,7 +166,7 @@ namespace SplashEdit.RuntimeCode
|
||||
_collisionExporter = new PSXCollisionExporter();
|
||||
_collisionExporter.Build(_exporters, GTEScaling);
|
||||
if (_collisionExporter.MeshCount == 0)
|
||||
Debug.LogWarning("No collision meshes! Set CollisionType=Solid on your floor/wall objects.");
|
||||
Debug.LogWarning("No collision meshes! Set CollisionType=Static on your floor/wall objects.");
|
||||
|
||||
// Phase 4+5: Room volumes are needed by BOTH the nav region builder
|
||||
// (for spatial room assignment) and the room builder (for triangle assignment).
|
||||
@@ -295,6 +297,7 @@ namespace SplashEdit.RuntimeCode
|
||||
audioSources = _audioSources,
|
||||
canvases = _canvases,
|
||||
fonts = _fonts,
|
||||
triggerBoxes = _triggerBoxes,
|
||||
};
|
||||
|
||||
PSXSceneWriter.Write(path, in scene, (msg, type) =>
|
||||
|
||||
Reference in New Issue
Block a user