Jump to content

object_ref order and transitions

Recommended Posts


I am attempting to perform smooth transitions. They have the same bone hierarchy, at least as far as I can tell.

When transition between two animations, sprites will flip or do a 360 degree rotation.

Looking at the animations in the SCML, they have this:

          <object_ref id="0" parent="8" timeline="1" key="0" z_index="0"/>
          <object_ref id="1" parent="9" timeline="2" key="0" z_index="1"/>
          <object_ref id="2" parent="10" timeline="3" key="0" z_index="2"/>
          <object_ref id="3" parent="14" timeline="12" key="0" z_index="3"/>
          <object_ref id="4" parent="11" timeline="33" key="0" z_index="4"/>
          <object_ref id="5" parent="13" timeline="11" key="0" z_index="5"/>
          <object_ref id="6" parent="12" timeline="10" key="0" z_index="6"/>
          <object_ref id="7" parent="1" timeline="0" key="0" z_index="7"/>
          <object_ref id="8" parent="5" timeline="4" key="0" z_index="8"/>
          <object_ref id="9" parent="6" timeline="5" key="0" z_index="9"/>
          <object_ref id="10" parent="17" timeline="9" key="0" z_index="10"/>
          <object_ref id="11" parent="16" timeline="8" key="0" z_index="11"/>
          <object_ref id="12" parent="15" timeline="7" key="0" z_index="12"/>
          <object_ref id="13" parent="4" timeline="15" key="0" z_index="13"/>
          <object_ref id="14" parent="2" timeline="13" key="0" z_index="14"/>
          <object_ref id="15" parent="7" timeline="6" key="0" z_index="15"/>
          <object_ref id="16" parent="3" timeline="14" key="0" z_index="16"/>

What I noticed is that although the bone_ref's have the same parents and timelines, the object_refs change:

So object_ref id=4 will have 11/ 33:

          <object_ref id="4" parent="11" timeline="33" key="0" z_index="4"/>

But in another animation, 

          <object_ref id="0" parent="11" timeline="33" key="0" z_index="0"/>

object_ref 0 has it.

Manually modifying the object_refs to be the same actually seems to correct the transition issue.

Forgive my ignorance. What is going on here? Is there a way to ensure that these are the same via Spriter itself so that transitions can work? If I understand it, these somehow have a different hierarchy, correct?

Looking at it in Spriter, they look identical.  

EDIT: I appear to be able to correct this by doing the following:

1. Adjusting the order in one of the animations frames. 

2. Copy that order to all other frames (using Edit -> copy ...)

3. Adjust the order to match in the next animation.

4. Copy that order to all other frames...

Does that make sense? Is there an easier way?





Share this post

Link to post
Share on other sites

Hello, the timeline specifies the index of the timeline that's being parented, and the parent refers to the index of the transformed parent.  If you use an array or list for the results of your bone transformations.  The first one in the hierarchy is 0, second is 1, etc.  

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...