HaxeFlixel / flixel

Free, cross-platform 2D game engine powered by Haxe and OpenFL
https://haxeflixel.com/
MIT License
1.92k stars 427 forks source link

Detect changes to clipRect without needing to reset the field in order to take effect #3162

Open DetectiveBaldi opened 1 month ago

DetectiveBaldi commented 1 month ago

currently, using FlxRect for fields such as FlxSprite.clipRect requires reassigning in order for changes to take effect. i've seen multiple people question this, and i've wondered if there's a simpler way around it.

Some ideas:

If we went with the latter, we could potentially remove FlxCallbackPoint and add similar functionality into the standard FlxPoint class.

Geokureli commented 1 month ago

As I said in chat, I'm not a fan of FlxCallbackPoints for memory reasons and I'm even trying to do away with that in the long run. but I think there may be another way to detect changes to the clipRect field, i'll do some test when I have time