GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How can I constrain at the edge of screen and grow?

Simple Gamer ArtsSimple Gamer Arts Posts: 244Member, PRO
edited January 6 in Working with GS (Mac)

How can I constrain an actor at the bottom edge of screen and make him grow back and forth in height?

I got the interpolate growing back and forth fine... just need to know how to constrain the actor to the bottom of the screen and make him grow back and forth in Height... in other words, his center would be moving up and down (i'm guessing)

Comments

  • SocksSocks London, UK.Posts: 12,821Member
    edited January 6

    @Simple Gamer Arts said:
    How can I constrain an actor at the bottom edge of screen and make him grow back and forth in height?

    Constrain Height to A*sin( game.time*B )+C
    Constrain Y position to Height/2

    A is the amount of growth up and down, B is the speed of growth, C is the actor's height.

  • Simple Gamer ArtsSimple Gamer Arts Posts: 244Member, PRO

    @Socks you sir are a master. Thank you!

Sign In or Register to comment.