👾
Prodigy
  • Prodigy
  • News
  • Getting Started With Prodigy
  • How To...
    • Create Items (or anything)
    • Create Weapons
    • Create Abilities
    • Create Characters
      • Damage / Hitboxes
      • Locomotion
      • Attributes / Vitals
      • Equipment
      • Abilities / Skills
      • Enemy AI
    • Use WASD or Click To Move
  • Change Characters
  • Gamepad support
  • Design Philosophies
    • Vault - Editor, Database & Inventory
    • Attributes
    • Locomotion
    • Equipment (wip)
    • Abilities (wip)
    • Animation (wip)
  • Support & Links
    • Support
    • Get it on the Asset Store!
Powered by GitBook
On this page

Was this helpful?

  1. How To...
  2. Create Characters

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 :

  • 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

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.

PreviousDamage / HitboxesNextAttributes / Vitals

Last updated 3 years ago

Was this helpful?