Setting up characters - Pupcheco/Every_Day_Heroes GitHub Wiki

Player

  • For the Character Controller, make sure you set the objects you want considered as the ground to the Ground layer. This layer mask is required for the character controller to know what is the "ground."
    • In the Player script, assign the layerMask to Ground.
    • Make sure to also assign the Vector3 groundPoint to the player prefab, find a point at the bottom of it.
  • To enable NPC followers:
    • Set Player object's tag to "Player."
    • Add an empty child object called "FollowTarget" to the player, and place it one or two meters behind the player object (for the NPCs to follow).
  • Adjusting Player Jump
    • Make sure to add the Ground tag to all objects that the player should be able to jump on
    • Change the Jump Force attribute to account for the player's mass and the general strength of the jump

NPC

  • The NPC script references an "NPCData" Scriptable Object. The default is "Prototype NPC" (found in the Scriptable Objects folder), but you can create new ones with new input parameters (move speed, wander distance, etc) by right clicking > Create > Every Day Heroes > NPC. Then make sure your NPC script references that new data object.
  • Make sure any scene an NPC needs to be running around in has a navigation mesh.