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 are controlling.
Inside AgentLocomotion the clients apply any movement orders that are pending.
Scenario A (ideal)
Structure :
Scene GameObject "Input Bridge" (
InputProvider)Scene GameObject "Player Bob" (
AgentLocomotion) (Animator)Bones Hierarchy
3D Model
etc...
Process :
InputProviderhooks intoOnPlayerSpawnevent.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)
InputProvidercaptures raw input data and translates it.Playerreads input data insideInputProviderPlayerpasses input toAgentLocomotionAgentLocomotionapplies input.The GameObject moves around in the scene.
Comments
You can put the Input Provider anywhere. It just needs to know who to hook up with. In the default structure the Agents can't operate without being spoon fed sanitized inputs. The Demo AI provides all of this internally and sends it to the Locomotion system. You can do this for your characters too if you prefer that architecture.
Last updated
Was this helpful?