- ConcealmentMeter: standalone component measuring the percentage of the character volume embedded inside environment geometry (bake -> voxelize via column ray-stabbing parity -> classify interior voxels against box/sphere/ capsule/convex colliders and terrain). Always-on, throttled, gizmo debug. - SkinnedColliderBaker: sole per-frame collider bake owner for skinned rigs. MeshPainter now delegates baking and only borrows BakedMesh for the GPU raster and cache refresh, so the collider stays fresh outside paint mode. - Move pose assets to Assets/Poses, retire unused Insect scripts to Assets/Unused, restore Paintman.controller; mode scripts and scene updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
39 lines
1.2 KiB
C#
39 lines
1.2 KiB
C#
/// <summary>
|
|
/// Insect / surface-walk mode: the player crawls along any surface (walls, ceilings,
|
|
/// arbitrary slopes) via <see cref="InsectController"/>. The gravity-based
|
|
/// <see cref="PlayerCharacterController"/> is disabled so the two never fight. The
|
|
/// camera keeps its world-up orbit; painting is off.
|
|
/// </summary>
|
|
public class InsectMode : GameMode
|
|
{
|
|
public override string DisplayName => "Insect";
|
|
|
|
public override void Enter()
|
|
{
|
|
if (Manager.Player)
|
|
Manager.Player.enabled = false; // stop the gravity controller (its Update/gravity)
|
|
|
|
//if (Manager.Insect)
|
|
//{
|
|
// Manager.Insect.enabled = true;
|
|
// Manager.Insect.ControlEnabled = true;
|
|
// Manager.Insect.SnapToSurface();
|
|
//}
|
|
|
|
if (Manager.CameraInput)
|
|
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.AlwaysActive;
|
|
|
|
if (Manager.Painter)
|
|
Manager.Painter.PaintingEnabled = false;
|
|
}
|
|
|
|
public override void Exit()
|
|
{
|
|
//if (Manager.Insect)
|
|
// Manager.Insect.enabled = false;
|
|
|
|
if (Manager.Player)
|
|
Manager.Player.enabled = true;
|
|
}
|
|
}
|