Set parent makes the go disappear

I have a situation where a call to go.set_parent causes the go to disappear.

This code separates part of a collection and move it successfully.

        soul.beingRef = soul.collection[hash("/being")]
        flameOffset = go.get_position(soul.beingRef)
        go.set_parent(soul.beingRef, nil, true) --does not separate until next frame

        go.animate(soul.beingRef, "position", go.PLAYBACK_ONCE_FORWARD, mooring+seat-flameOffset, go.EASING_OUTSINE, 3)

But when I try to attach it to another object, it disappears.

        go.set_parent(soul.beingRef, "/seat2", true) --does not combine until next frame

I thought it might be a coordinates issue, but when I set the object’s position to zero, before attaching it, gave the same result.

Any thoughts? I’m sorry I don’t have time to build an example project. I have a deadline tomorrow, and while this bug is annoying it won’t get in the way of my deadline.

Could it be a z-position issue? Could it be that the child gets a z-value on a sprite that goes outside of the near or far plane?

2 Likes

I don’t think it’s a z issue. I set z to zero as part of test setting the object’s position.

I’ll be investigating, and I’ll update this post when I figure out what I’m doing wrong.

thanks for your attention