Hover effect using expression

I was wondering if there was possible to make a 'hover' effect using an expression rather than animation ?
I want a sort of bobbing up and down effect on my character when idle and while moving.

Any help is appreciated

Answers

  • SocksSocks London, UK.Member Posts: 12,822
    edited November 2015

    Random bobbing up and down:

    Constrain:

    X to 12 *cos( self.Time *140)+9 *sin( self.Time *174) + X origin
    Y to 13 *sin( self.Time *122)+7 *cos( self.Time *189) + Y origin
    R to 2 *cos( self.Time *75)+2 *sin( self.Time *167)

    Adjust to taste.

    Smooth floaty / bobbing up and down:

    Constrain:

    X to 12 *cos( self.Time *140) + X origin
    Y to 11 *sin ( self.Time *122) + Y origin
    R to 2 *cos ( self.Time *75)

  • ArmellineArmelline Member, PRO Posts: 5,368

    @Socks said:
    X to 12 *cos( self.Time *140)+Y origin
    Y to 11 *sin ( self.Time *122)+X origin

    Great tips! I assume the X and Y origins are the typo'd the wrong way round there though?

  • SocksSocks London, UK.Member Posts: 12,822

    @Armelline said:

    @Socks said:
    X to 12 *cos( self.Time *140)+Y origin
    Y to 11 *sin ( self.Time *122)+X origin

    Great tips! I assume the X and Y origins are the typo'd the wrong way round there though?

    Whoops ! Yep, they are the wrong way 'round, post now corrected, cheers !

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    You could also acomplish this using move behaviors.

Sign In or Register to comment.