#### Howdy, Stranger!

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

# If actor A moves to the left, actor B moves by the same amount to the right...

Posts: 37Member
edited July 2016

Hello guys! I need a help. It would be much appreciated!

So i have 2 actors, A and B.
Actor A that i can press and drag only to the left (along the X axis), and actor B should suppose to mimic that movement but to the opposite side (to the right).

To sum up, it should look something like this - every time actor A moves to the left by 1 pixel, move actor B to the right by 1 pixel.

If anyone knows how to make this work, I would appreciate allot you're help! THANK YOU!

• London, UK.Posts: 12,821Member
edited July 2016 Accepted Answer

@RedCubeGames said:
@Icebox I wonder about one more detail, is it possible to do.. Is it possible, when i press the actor A, that he doesn't snap to the position of the press (in this case position of the mouse arrow)? Hmm it seems like i just can't figure out this one..

You just need to throw in a little basic maths, an offset of some kind, the different between where you click and where the actor is (the 'offset') . . . hold on let me make a quick demo . . .

Ok, file attached, should give you the basic idea.

• Posts: 37Member

@Icebox This is just pure awesomeness! Thank you so so much! PERFECT

• Posts: 37Member

@Icebox I wonder about one more detail, is it possible to do.. Is it possible, when i press the actor A, that he doesn't snap to the position of the press (in this case position of the mouse arrow)? Hmm it seems like i just can't figure out this one..

• Posts: 37Member

@Socks It doesn't get any better than this (your demo), thank you very much! ... It looks like i will have to remind myself with maths ...Thank you one more time!