Jump to content

Negative scale values in Trixt0r XNA implementation


billymonks

Recommended Posts

Hello all, I apologize if I am posting in the wrong place.

 

I am working on a game using the Trixt0r XNA implementation of Spriter to display objects.

 

The other night I discovered that bones & sprites which had negative X_scale values were failing to render in game.

 

6J8drB6.png --> 6NONmNd.png

 

Are there any known solutions or workarounds? Any help with this issue would be greatly appreciated. 

 

Edit: As a workaround I replaced the bones and sprites that had negative Xscale.

 

Spriter is an excellent tool and I am very thankful for its existence, even in its early state, and Trixt0r for his open source implementations which have saved me months of work.  :mrgreen:

Link to comment
Share on other sites

  • 4 months later...

from what i see about your axis in spriter, if you are scaling for Y, than all object will be mirrored outside of your screen (the one on your screenshot).

something like that:

      Y /\

          |     ---

          |    O

          |     o

          |

------------------------> x

          |          

          |     o

          |    O

Link to comment
Share on other sites

  • 3 weeks later...

@billymonks, I know this reply is a bit late, but if you still need it.  see if this helps:
 
 

// before adding the parent.angle to child.angleif(parentInfo.scaleX*parentInfo.scaleY<0) // if one, but not both are negative{     child.angle*=-1;     // or child.angle=360-child.angle     // (if you want to keep it within the 0 - 360 range)}
Link to comment
Share on other sites

  • 2 weeks later...

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.

Guest
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...