Search Unity

Need help adding animation events to a spline-based path.

Discussion in 'Animation' started by saucer78, Feb 28, 2015.

  1. saucer78

    saucer78

    Joined:
    Jul 6, 2014
    Posts:
    66
    I'm overwhelmed with animation tutorials, and am having trouble finding documentation on switching between states. I don't need help animating a character, I need help creating events(?) to have that character change animations along a path. I know zero code.

    Here's what I have:
    I want the dragon to change between its looped animations while following a pre-determined path through the sky - like a scripted cutscene, with no input in runtime. As he dives, I want to initiate a "swoop" animation, as he climbs, I want to trigger the "flap_wings" animation, etc., to mimic a realistic change in the different states of flight.

    Can anyone give me a quick step by step or point me to an appropriate tutorial, using either Mecanim or Legacy? (I have the read Animation Manual 2x and watched the official Unity videos, but still cannot grasp this concept!)

    Thanks!
     
    Last edited: Feb 28, 2015
  2. saucer78

    saucer78

    Joined:
    Jul 6, 2014
    Posts:
    66
    ...Just to illustrate my line of thinking, I've tried to select various waypoints along the path and "Add Component>Miscellaneous>Animation," and selecting the appropriate animation. Nothing changes :mad:
     
  3. JBR-games

    JBR-games

    Joined:
    Sep 26, 2012
    Posts:
    708
    Could I suggest maybe adding a trigger at the waypoint.
    and as the dragon hits the trigger have a script on the trigger
    which tells dragon to play said animation ?

    With waypoints the dragon could fly near it and not through it so i would advise a fairly large Trigger area or a zero variance in wander if you are using Unity's sample assets waypoint system.