Stuck! Stop moving after collision, but...
BarkBarkCo
Member Posts: 1,400
working on an puzzle game that is similar to unblock me.
I have a 200x200 grid of 40x40 blocks, with some empty spaces. instead of using touch to move the blocks, I am using buttons along the perimeter which "pull" the blocks in the corresponding row/column toward them, filling in any empty space in the row/column. an active button would continuously pull on its blocks until it is deactivated.
my problem...
i am triggering block movement by "shooting" invisible trigger actors away from the button, toward the blocks. when a block detects the collision, rules tell it to move toward the source of the trigger actor. when the blocks move they collide and bounce. I want them to occupy the empty space then stop. however, if a block were to be pulled out of that row/column, i would want the remaining blocks to move to fill in the empty space.
any thoughts, ideas to get this to work?
I have a 200x200 grid of 40x40 blocks, with some empty spaces. instead of using touch to move the blocks, I am using buttons along the perimeter which "pull" the blocks in the corresponding row/column toward them, filling in any empty space in the row/column. an active button would continuously pull on its blocks until it is deactivated.
my problem...
i am triggering block movement by "shooting" invisible trigger actors away from the button, toward the blocks. when a block detects the collision, rules tell it to move toward the source of the trigger actor. when the blocks move they collide and bounce. I want them to occupy the empty space then stop. however, if a block were to be pulled out of that row/column, i would want the remaining blocks to move to fill in the empty space.
any thoughts, ideas to get this to work?