Actor constrain basic question

CabacoCabaco Member Posts: 414
edited December 2011 in Working with GS (Mac)
I want an actor to stay on the bottom of another actor while this interpolates to the coordinates -30 width in portrait. The falling actor size is width: 50 and height 25, can someone tell me how to make an actor constrain to the bottom of my falling actor?

Comments

  • cbtcbt Member Posts: 644
    You can use;

    Constrain
    self.X to ACTOR.X
    self.Y to ACTOR.Y + (ACTOR.HEIGHT / 2) + (self.HEIGHT / 2)

    This constrains it to the top of the ACTOR. For bottom, change every "+" to "-".

    And you can change their sizes all you want. This still will work.
Sign In or Register to comment.