Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Positioning after animation

Discussion in 'Scripting' started by Sphinks, Jul 5, 2022.

  1. Sphinks

    Sphinks

    Joined:
    Apr 6, 2019
    Posts:
    267
    Hello together,

    I want to re-position an enemy after it jumped with an animation but i don´t get how to do it. Because the position in the Editor isn´t the one I set in the code and what I get in the debug log.
    Position.png
    I´m using an AnimationEvent therefor, that works actually fine and I just dont´t get it, why the position isn´t correct. Could it be a problem with the animation ? I think it was created originally with blender. I copied an existing animation (ctrl + d), cut something away and changed the range of the jump with the (animation-)curves of the ROOT.

    Jump_StartPosition.png Jump_LandingPosition.png
    So my goal is to position the enemy after the jump on the ground. If there is a better solution as setting the position in the code please let me know.
     
  2. Sphinks

    Sphinks

    Joined:
    Apr 6, 2019
    Posts:
    267
    Does nobody has an idea what i´m doing wrong or are some info missing that are needed to get help ? Please let me know, if I shall provide something else. I just want to position correctly after the jump animation...