Search Unity

Question Animation Logic Not Updating Until Frames Later

Discussion in 'Animation' started by jranellstein, Aug 15, 2022.

  1. jranellstein

    jranellstein

    Joined:
    Aug 10, 2022
    Posts:
    2
    Hi, I am working on a sample character for a capstone project. I'm using a humanoid model from mixamo.com and am trying to get the characters movement working properly. Everything works as it should (the physics, movement speed, etc.) I just have one issue. Every time I key in an action for my character to do, like jumping for instance, within my update method for my character I created a conditional statement that checks to make sure that the character is currently in the "jump" animation state, if so then it does the jump logic within it. My problem is that none of the logic in that conditional statement activates until frames later instead of frame 1. My character (see gif attached) does not activate its jump physics until well after the animation already began. Same for when it lands, the animation activates when the character touches the ground, but doesn't correct its position until frames later, giving the illusion it is initially falling through the ground. At first I thought this was a physics issue, but after putting a debug.log statement within the same method, the statement doesn't show up until frames later either, right when the physics begins too. Any help or suggestions would be most appreciated!
     

    Attached Files: