Pinned Objects do not mirror with parent

0 favourites
  • 4 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • The only way to get pin to work again after mirroring its parent is to manually unpin the object, update its position to the image point again, and repin it. So the image points themselves appear to be mirroring correctly, but the pinned objects are not following suit. Pinned objects *will* follow any other type of motion / rotation / etc.

    In the unlikely even that a change of this type could potentially break legacy projects which depend on mirror not updating the pinned object's position, could we at least have a Pin Option when an object is pinned along the lines of "Respect Parent Mirroring"?

    I'm using the workaround currently, but the problem with this is that I have some objects which have N number of image points and the objects that are pinned are also fairly dynamic (mostly belonging to families but occasionally different), having to reset this stuff all the time can get kind of frustrating.

    Link to .capx file (required!):

    Pin Mirror Capx

    Steps to reproduce:

    1. Create parent object

    2. Spawn child object and pin to parent

    3. Mirror parent

    Observed result:

    Child does not mirror with parent, it remains in the same position.

    Expected result:

    Child should mirror with parent.

    Operating system & service pack:

    Windows 7 64-bit

    Construct 2 version:

    Release 126

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think all you want is a single event that says "Every tick, position child to Master imagepoint "SpawnPt" and set angle to Master.angle".

    If we make mirroring affect the pin, then shouldn't flipping also affect the pin? If not why not, and if so how would that work? The pin behavior doesn't know you're trying to attach it to an image point, it just preserves the relative distance and angle. It's such a simple behavior and trivial to reproduce in events (in this case one event does it), so I think it's fair to say if the behavior doesn't do what you need, rebuild it with events.

  • Ashley, I can understand that. I created a PinFamily whose objects have attributes:

    IsPinned (bool)

    Owner (UID)

    ImagePtName (string)

    Then I just have a single statement that repositions any objects on layout in PinnedFamily with IsPinned = Enabled.

    That way whenever I spawn an object I want pinned, I can just set those attributes on the object, and the game will handle pinning them.

    Thanks!

  • Got the same problem, so thought i'd ask here instead of making a new thread.

    I've got a marionette that's made up of multiple body parts pinned together and then pinned to a base image that acts as collision.

    I've got it set up so that the base image mirrors based on whether the pathfinding is moving left or right. I've tried cacotigon's method of unpinning, updating the pin position/master.Angle and then reattaching and it doesn't react.

    Is there any idea if the above solution of creating a family would work? I've been trying to find a solution that would preserve the relative attachment of the segments but to no avail.

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