public struct MoveIntentWhat a player is asking for this tick: where to go, where to look, what is held.
Remarks
The one seam between input, movement and the network, and the reason each of those can live in an assembly that cannot see the other two. PlayerInputSystem writes it from a device, CharacterMovementSystem in Vixen.Physics reads it, and Vixen.Net.Engine quantizes it onto the wire — three layers agreeing on one struct instead of three translations that have to be kept in step. [29](../../../docs/plan/29-players-and-possession.md) is the argument.
An absolute Yaw, not a yaw delta. A delta is what a mouse produces and it is the wrong thing to carry: two machines integrating deltas drift apart, and a server handed a delta has nothing it can refuse. What crosses every boundary here is where the player is looking, which an authority is free to reject outright.
It is held twice — once by the controller and once by the pawn. The pawn's copy is derived: PossessionSystem overwrites it every frame from whatever is driving, the way WorldTransform is overwritten from the hierarchy. Anything writing the pawn's copy directly has to have no PossessedBy for the write to survive. The alternative — every movement chunk following the edge back to its controller — turns a sequential sweep into two random accesses per entity to save four copies at the top of the frame.
Fields and properties (4)
public Vector2 MoveWhere the player wants to go, in the frame their look direction defines. X is right, Y is forward, and the magnitude is never expected to exceed one.
public float YawWhich way the player is looking, in radians about the world's up axis.
public float PitchHow far up the player is looking, in radians. Positive looks up.
public MoveButtons ButtonsWhat is held.
Methods (2)
public readonly bool IsHeld(MoveButtons button)Whether a button is held.
public readonly Vector3 WorldDirection()The direction the intent points, in world space.
Used by (30)
- PlayerRigThirdPersonShooter
- WeaponFireThirdPersonShooter
- ActionPlayerInputVixen.Engine
- CharacterAllocationTestsVixen.Physics.Tests
- CharacterMotionVixen.Physics
- CharacterMotionTestsVixen.Physics.Tests
- CharacterMovementSystemVixen.Physics
- CharacterSceneTestsVixen.Physics.Tests
- ComponentRegistrationVixen.Engine
- ConstantVixen.Engine.Tests
- IPlayerInputSourceVixen.Engine
- MachineVixen.Net.Physics.Tests
- PhysicsSceneVixen.Physics
- PlayerVixen.Engine
- PlayerAllocationTestsVixen.Engine.Tests
- PlayerInputQuantizeSystemVixen.Net.Engine
- PlayerInputQuantizeSystemTestsVixen.Net.Engine.Tests
- PlayerInputSystemVixen.Engine
- PlayerInputTestsVixen.Engine.Tests
- PlayerMoveInputVixen.Net.Engine
- PlayerMoveInputTestsVixen.Net.Engine.Tests
- PlayerSpawnerTestsVixen.Net.Engine.Tests
- PossessionSystemVixen.Engine
- PossessionTestsVixen.Engine.Tests
- PredictedPlayerMovementVixen.Net.Physics
- PredictedPlayerMovementTestsVixen.Net.Physics.Tests
- ScriptedVixen.Engine.Tests
- TypeRegistrationVixen.Engine
- Vixen_Engine_Players_MoveIntentSerializerVixen.Engine
- MaterialIconsVixen.Editor.App