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

RedCubeGamesRedCubeGames Member Posts: 37
edited July 2016 in Working with GS (Mac)

Hello guys! :smiley: 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! :smiley: THANK YOU! :smiley:

Best Answers

  • IceboxIcebox Posts: 1,485
    Accepted Answer

    Here is one way to do it, I attached a demo

  • SocksSocks London, UK.Posts: 12,822
    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.

Answers

  • RedCubeGamesRedCubeGames Member Posts: 37

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

  • RedCubeGamesRedCubeGames Member Posts: 37

    @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..

  • RedCubeGamesRedCubeGames Member Posts: 37

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

Sign In or Register to comment.