Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

MatchTarget doesnt work (Vault Animation).

Discussion in 'General Discussion' started by CDVoss, Sep 18, 2019.

  1. CDVoss

    CDVoss

    Joined:
    Jun 24, 2019
    Posts:
    10
    Hello guys.
    Im trying to get a vault animation to function properly - The animator does do the animation - but the animation is out of place. The hand has to touch the obstacle its vaulting over, and align it so, the body goes over the vault. Right now the whole animation is just going through the same y position.
    I have debugged the raycast, and it shows the right location of the top of the box - But it doesnt want to apply the matchtarget part for some reason.


    I have the script.




    Sorry if my English gramma is faulty - I understand the language better than i can express it.
    I hope we can find a solution to this problem. I appriciate all contributions! :) Animator controller.PNG
     

    Attached Files:

    Last edited: Sep 18, 2019
  2. dibdab

    dibdab

    Joined:
    Jul 5, 2011
    Posts:
    976
    don't put your JumpOverMatchTarget() under Physics.Raycast because when player starts to jump, raycast turns false and matchtarget won't execute.
    instead use hasTarget bool or similar and turn false when vault has completed.

    I think this should be in the animation section of the forum, though