Locomotion

Relevant Components

InputProvider, ProdigyPlayer, AgentLocomotion,

Typical Setup

Essentially InputProvider captures data from a New Input System's ControlScheme, translates it based on your desired movement style and controller, and converts it to sensible data that the AgentLocomotion script wants. This information is collected by the ProdigyPlayer script and is then passed on to whatever Agent they happen to be controlling at the time.

Inside AgentLocomotion the clients apply any movement orders that are pending.

You can control how the feel of your locomotion is by adjusting the Locomotion Settings in the ProdigyAgentDefinition entry for each individual character you create. The settings are highlighted in the image above.

Scenario A (ideal)

Structure :

  • Scene GameObject "Input Bridge" (InputProvider)

  • Scene GameObject "Player Bob" (AgentLocomotion) (Animator)

    • Bones Hierarchy

    • 3D Model

    • etc...

Process :

  • InputProvider hooks into OnPlayerSpawn event.

  • InputProvider 'binds' to the Player.

  • Player Agent/Avatar is spawned into the game.

  • Player Binds to the Avatar.

  • User is pressing buttons and things (Loop)

    • InputProvider captures raw input data and translates it.

    • Player reads input data inside InputProvider

    • Player passes input to AgentLocomotion

    • AgentLocomotion applies input.

    • The GameObject moves around in the scene.

Comments

Generally you don't need to interact with the input or locomotion much. Just find the settings that feel right for your project and don't think about it too much.

Last updated

Was this helpful?