Search Unity

Adding full body controller to Unity fps Microgame

Discussion in 'General Discussion' started by Wobeid, Feb 9, 2023.

  1. Wobeid

    Wobeid

    Joined:
    Jan 28, 2023
    Posts:
    2
    Hey Yall, I hope to find some help for a problem I'm facing. I am trying to add a full-body controller to the free fps microgame I have already created and rigged animations to a model and put the player character controller and player input handler on the model. However, when I try to play the game the model is just gliding across the floor without playing the animations. How should I edit the scripts so the animations come through?

    I know I should make a whole new system but I don't know why I just love the feel and look of the fps microgame for some reason and any attempt I make to recreate it doesn't feel the same.
     
  2. warthos3399

    warthos3399

    Joined:
    May 11, 2019
    Posts:
    1,758
    First thing that comes to mind is you have no NavMesh baked, and the controller has to be a NavMesh agent...
     
  3. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
    I dont know why that would be relevant to not playing animations - has nothing to do with what OP is asking.

    OP, the answer is you need to call the correct functions on the target animator to actually trigger those animations. You make animation parameters (such as a bool to say "is running" or a float to represent movement speed) and then use those as state transitions in mecanim

    then you use stuff like https://docs.unity3d.com/ScriptReference/Animator.SetTrigger.html for example to trigger the animations via the animator controller https://docs.unity3d.com/2022.2/Documentation/Manual/class-AnimatorController.html

    You can read more about the animation system here and in following pages: https://docs.unity3d.com/2022.2/Documentation/Manual/AnimationOverview.html

    Good luck :)
     
    Ryiah and ippdev like this.