You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a negative scaleX/scaleY is used, GetTextureRectRelativeToContainer() breaks.
I was able to fix this by wrapping the scaleX and scaleY in Math.Abs(), but I'm wondering if there's a better way to mirror an FSprite besides that, or if it just doesn't make sense to have negative scaleX/scaleY.
The text was updated successfully, but these errors were encountered:
`Player` wasn't having hit detection because of the mirrored `scaleX`.
It might be a bug in Futile, so I just modified the
`GetTextureRectRelativeToContainer()` method in order to "fix" it. An
issue has been filed
[here](MattRix/Futile#215).
Hmm, yeah negative scaleX and scaleY is the intended way to flip a sprite. The actual issue here is caused by the fact that most rect contains/intersection algorithms don't handle negative rect widths and heights. Futile has a built in extra rect extension called rect.CheckIntersectComplex(otherRect) that's meant for dealing with that though.
When a negative
scaleX
/scaleY
is used,GetTextureRectRelativeToContainer()
breaks.I was able to fix this by wrapping the
scaleX
andscaleY
inMath.Abs()
, but I'm wondering if there's a better way to mirror anFSprite
besides that, or if it just doesn't make sense to have negativescaleX
/scaleY
.The text was updated successfully, but these errors were encountered: