Skip to content

fix rotation on flxfilterframes demo#349

Merged
Geokureli merged 3 commits intoHaxeFlixel:devfrom
ninjamuffin99:flxfilterframes-flying-fix
Apr 30, 2024
Merged

fix rotation on flxfilterframes demo#349
Geokureli merged 3 commits intoHaxeFlixel:devfrom
ninjamuffin99:flxfilterframes-flying-fix

Conversation

@ninjamuffin99
Copy link
Copy Markdown
Member

I believe in FlxFilterFrames.applyToSprite() function, it adds an offset (from this flixel merge/pr HaxeFlixel/flixel#2176)

here we simply just reset the offset to the sprite, so it doesn't adjust the offset incorrectly and constantly increment it

@ninjamuffin99 ninjamuffin99 mentioned this pull request Apr 26, 2024
42 tasks
@Geokureli
Copy link
Copy Markdown
Member

so it seems the issue is that it adds the offset every frame, but it should only add the offset when the filter wasn't active previously?

@ninjamuffin99
Copy link
Copy Markdown
Member Author

right, so could be something that's changed within flixel itself!

could also do something like account for it's current offset maybe. I'll leave the flixel side up to you though :)

@Geokureli
Copy link
Copy Markdown
Member

I'm not entirely sure what the best course of action is here, I think FlxFilterFrames usefulness is highly situational, I don't think I would use it in the way this demo does, where it generates new frames every update, and I think it's mostly a leftover feature from flixel's blitting days. for most of these I would try to use a shader, but even that isn't a perfect solution

I've decided to merge this, and take a look at FlxFilterFrames to see if there's a way to un-apply the current effects before re-applying, but really this class might need a rewrite

@Geokureli Geokureli merged commit d2ffcfe into HaxeFlixel:dev Apr 30, 2024
@Geokureli
Copy link
Copy Markdown
Member

Thanks!

@Geokureli Geokureli added this to the 3.2.0 milestone May 1, 2024
@Geokureli Geokureli added the Bug label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants