Auto Drag an actor to the center of another! How to do this?

scrapee_netscrapee_net Member Posts: 424
edited November -1 in Working with GS (Mac)
Hello Guys.
I think almost all of you have played Doodle Jump already.
I'd like to know how can I do, to when my actor (player) overlaps with an blockhole actor, to be dragged by the black hole to its center...

thanks.

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Make 2 real game attributes. Ill use blackholex and blackholey as example. In the blackhole actor have 2 constrain attribute behaviors. In the first one constrain attribute self.position.x to blackholex. In the second one constrain self.position.y to blackhole y. Then in the player have a rule when actor overlaps with actor blackhole, interpolate positionx to blackholex and interpolate position y to blackhole y
  • scrapee_netscrapee_net Member Posts: 424
    Thanks. Worked very well. But, instead of constrain attribute, I used, move to...
    nice
Sign In or Register to comment.