Skip to main content

Interface IMoveable

Accepts a normalised 2D movement input and applies it to the underlying physics, providing a single contract that both player input and AI MoveCommand can drive without knowing the concrete actor type.

public interface IMoveable : IHasUnityContext

Implements​

IHasUnityContext

Remarks​

Implementing IMoveable on both the vehicle pawn (PrometeoCarController) and the pedestrian pawn (PhysicsBasedCharacterController) means the AI command layer and the player controller can issue identical Move(Vector2) calls regardless of which pawn is active.

Methods​

Move(Vector2)​

Applies a normalised 2D movement input to the unit.

void Move(Vector2 input)

Parameters​

NameTypeDescription
inputVector2Normalised input vector where x is the lateral/steering axis and y is the forward/throttle axis, both in the range [−1, 1].

Stop()​

Brings the unit to a halt, equivalent to Move(Vector2.zero) but may additionally disengage physics forces on the concrete implementation.

void Stop()