How do I mirror picked up object?

  • Hello everyone! I got stucked.. So to pick up object, I set it to get pinned to the player.

    So when I change direction in platformer, the object stays behind the players back, on the same position.

    I tried to add mirror that object if the player is mirrored, but doesn't seem to work..

    I looked on the forum and all I found was to mirror the pinned object when player is mirrored, but it's not working for me..

  • Hello,

    Can you send a small capx so I can take a look ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Say, you want to pin a sword to character's hand.

    Create an image point on the hand, name it "SwordPoint".

    To pin the sword, first position the sword to "SwordPoint" (using "Set position to another object" action), then pin.

    When you mirror the character, unpin the sword, mirror the sword, set its position to "SwordPoint", then pin again.

    Another way to do this is to move the origin image point on the sword in such way that when you position it to character's origin image point, it appears in its hand. Then you'll be able to simply mirror both the character and the sword.

    See this picture:

    red dot is the character's Origin image point.

    red arrow shows the sword's Origin image point.

  • Changing origin point for a sprite to do this is not the best thing. Further sprites won't spawn at exact position and you have to test many times to set your sword position correctly according to the shift.

    I suggest you to use the Rex behavior Pin to Image Point for your sword with a image point on your character sprite as dop2000 said and then mirroring your character and the sword should work.

    Link to Rex behavior Pin to Image Point : https://c2rexplugins.weebly.com/rex_pin2imagepoint.html

  • That was just an example. It may not be a very good solution for a sword, but in many other cases when you need to pin one object at an offset to another one, this will work just fine.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)