FlxSpriteGroup: Allow clipRectTransform to be overriden#3388
FlxSpriteGroup: Allow clipRectTransform to be overriden#3388Geokureli merged 2 commits intoHaxeFlixel:devfrom
Conversation
|
I should mention that there is some previous discussions on cliprect + group + scaling I assume this is making a similar change to what was proposed in the first link, making clipRect refer to a rect in the world rather than a rect in the source. If so, thats a breaking change and I think we should go towards the solution proposed in 2898 |
|
this doesn't necessarily make cliprect a rect in the world, it just scales the cliprect for items in spritegroups, as using cliprects on spritegroups that have members that were scaled down from a larger size than the spritegroup causes clipping issues shown in the first video. for now, what are thoughts on making the cliprecttransform in FlxSpriteGroup non-inlined so it can be overridden with the change? |
I think it's doable, and I would if I had time
sure |
setting cliprect to a flxsprite group that has scaled members results in weird clipping
this video shows the clipping prior to the change, notice the profile picture becomes visible further to the left than other members of the group, as well as being clipped due to the height of the clipRect being 102 and the original size of the profile picture before being scaled was 184 - after scaling down the picture is 72 pixels.
2025-03-05_19-00-50.mp4
with the change, FlxSpriteGroup changes the height of the members' clipRect based on their scale.
after the change:
2025-03-05_20-35-01.mp4
note that in the videos, the crown is not a part of the sprite group, so it being visible before the rest of the group is not relevant