-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature/automatic-offset-flipping] Attribute Is Facing Right #3556
[feature/automatic-offset-flipping] Attribute Is Facing Right #3556
Conversation
Why can't you just use the default value of |
lets look at tankman as an example: problem: note: |
But the So if a character has
|
it only swaps when its the character is on the player side, |
// { | ||
// for (anim in result.animations) | ||
// { | ||
// anim.offsets[0] *= -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the calculation we actually need is one similar to this:
Funkin/source/funkin/play/stage/Bopper.hx
Line 373 in fb4bbba
output.x += (animOffsets[0] * 2 + (width - frameWidth)) * this.scale.x; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but im pretty sure even if we have the correct calculation, there will still be edge cases.
so i might just write a python script to automatically set isFacingRight
to the correct value (just need to hope there is some library that can help me do that, although i kinda doubt that such a library exists)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the calculation we actually need is one similar to this:
Funkin/source/funkin/play/stage/Bopper.hx
Line 373 in fb4bbba
output.x += (animOffsets[0] * 2 + (width - frameWidth)) * this.scale.x;
I see, I should test this change out later.
That's what the anim.offsets flip in the |
yeah, but the calculation is wrong |
This reverts commit 93b9431.
i'll close this since #3543 does it nicer, and also has some other useful stuff |
FIXES / CHANGES
isFacingRight
attribute to character dataBy using
isFacingRight
, we can fix the problem of wrong animations and broken offsetsDefault is
true
if a character seems to have broken offsets, set
isFacingRight
to false, and see if that fixes it.