Stop actor exactly half way on another actor.

Hey, I've had a look through the forums but can't seem to find the answer to this. I'm trying to get an actor stop in the middle of another actor. So if I have a square hero, and he slides onto a square pad, he'd stop right at the half point, and it would then look to the user that there were two square, aligned centrally to one another.

The issue is that the square hero can be coming from either above, below or left/right.

I tried using a collision rule to set an attribute of x / position for hero, then add/subtract that from the pad actor and do a move to. But this didn't always trigger properly and to achieve that I need unlocked actors which will be tricky as I want to use tables to spawn in my level system.

Has anyone else managed to achieve something similar to the above?

Comments

  • vipasanevipasane Member Posts: 34
    Not sure if I understood correctly:
    Could you have two actors, one with the collision rule and one with graphics which "follows" x and y with constrain attribute behaviors?
    center point of an actor could be calculated for example centrer coord x = x + (width/2) depending on layer you might need to use camera origin x also.
Sign In or Register to comment.