Skip to content
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

Add offset propriety for each animation on the Spriteframes resource, used on AnimatedSprite2D node #11417

Open
sanlor opened this issue Dec 24, 2024 · 0 comments
Labels

Comments

@sanlor
Copy link

sanlor commented Dec 24, 2024

Describe the project you are working on

A Godot port of a GameMaker game (RPG), with many different animations for each AnimatedSprite2D.

Describe the problem or limitation you are having in your project

This game uses a very large amount of animations for each character. Thing is, some animations uses a different center / origin point or different dimensions from others animations.

Here is an example of a character laying on the ground and one standing up. both cant have the same center point due to the different image dimensions.
Image
Image

Here is an extreme example of a character getting shot and falling:
Image

The same issue happens with others spritesheet that can be found on the net:
https://www.spriters-resource.com/fullview/16912/
In this case, the character moving left and right have different center points from the character moving forward.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

For each animation on the SpriteFrame resource, having a "offset override" or something that applies an offset to the image ignoring the "offset" propriety on the AnimatedSprite2D node.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Like the "FPS" propriety, have an Offset propriety to the Spriteframes resource.
Image

If this enhancement will not be used often, can it be worked around with a few lines of script?

This issue has many workarounds, but many involves converting the spritesheet or mass changes on the game´s code.

Is there a reason why this should be core and not an add-on in the asset library?

There are many free resources and animations that expects that the offset / center can be changes per spritesheet / animation.
Resources made for Gamemaker could not be easily used without asset changes or special game code to take the different origin point into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants