Files
chameleon/Assets/Scripts/PaintMode.cs
T
adminandClaude Opus 4.8 cd40f42386 Add insect surface-walker controller and mode
Add InsectController (transform-driven SphereCast surface following, no
CharacterController/Rigidbody, no gravity or slope limit) and InsectMode as a
third game mode. Wire it into GameModeManager with conditional registration so
PlayerControl and Insect modes only join the Tab cycle when their controller is
present. PaintMode/PlayerControlMode toggle the insect controller accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 07:27:17 +02:00

27 lines
734 B
C#

/// <summary>
/// Player stands still, the mesh is painted with the left mouse button. The
/// camera orbits only while the right mouse button is held.
/// </summary>
public class PaintMode : GameMode
{
public override string DisplayName => "Paint";
public override void Enter()
{
if (Manager.Insect)
Manager.Insect.enabled = false;
if (Manager.Player)
{
Manager.Player.enabled = true;
Manager.Player.ControlEnabled = false;
}
if (Manager.CameraInput)
Manager.CameraInput.LookMode = ThirdPersonOrbitInput.OrbitLookMode.HoldRightMouseButton;
if (Manager.Painter)
Manager.Painter.PaintingEnabled = true;
}
}