How does Child/Parent relationship work with mirroring ?

0 favourites
  • 3 posts
  • I have 2 sprites.

    SpriteParent

    SpriteChild

    I set SpriteParent as "Mirrored"

    I Add child "SpriteChild" relationship on "SpriteParent"

    Then I spawn "SpriteChild" on "SpriteParent" image point.

    SpriteChild spawns "Not mirrored"

    I was expecting it to spawn like his parent "SpriteParent" as mirrored.

    Can somebody explain why it doesn't work that way?

  • When you add a child to an instance, Construct does all the calculations needed so the child keeps it's original transformation before attaching.

    Effectively what that means is that upon adding a child, it get's no visible changes. Only changes made to the parent after attaching will affect the child.

    If you mirror the parent after adding the child you will see a change.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • When you add a child to an instance, Construct does all the calculations needed so the child keeps it's original transformation before attaching.

    Effectively what that means is that upon adding a child, it get's no visible changes. Only changes made to the parent after attaching will affect the child.

    If you mirror the parent after adding the child you will see a change.

    Hi thanks for detailed explanation, yeah from my tests I noticed that if you add the child and then do changes to the parent it effects every child attached but in my case I'm spawning child as the game progresses and applying every change made on parent individually on the child that just spawned makes parent/child relationship useless :( It would be awesome if we could setup a way that children just take every change their parents has after getting attached to the parent.

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