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

modify the image point of a sprite when load image from URL #414

Open
2 tasks done
servalfox opened this issue Jan 4, 2025 · 0 comments
Open
2 tasks done

modify the image point of a sprite when load image from URL #414

servalfox opened this issue Jan 4, 2025 · 0 comments

Comments

@servalfox
Copy link

Reviewed guidelines

  • I have read and understand the suggestion guidelines

Checked for duplicate suggestions

  • I checked for existing similar suggestions

Summary

When we create an animation and load an image from url, the image point coordinates are (0,0).
It would be very useful to be able to modify the coordinates of the origin point in order to be able to center it on the sprite, or at other coordinates.

Possible workarounds or alternatives

For now we need to modify the sprite's position by calculating its position based on its size
-> card: Set position to (Self.X - (Self.width/2), Self.Y - (Self.height/2))
But it is not practical in all situations.

Proposed solution

In editor, when we add frame, that copy the previous frame size and origin point.
but when we add animation, it create a default 250x250 frame.

solution 1: add a parameter to copy an existing animation in sprite action "Add/Remove animation"
so we can manually create a default animation with the size and image point we needed and copy that animation

solution 2: add a parameter to modify origin point of a sprite in sprite action

Why is this idea important?

Games need to be lighter, and the action load from url allows to load only the necessary images.
In some card games for example, we can thus avoid the user having to load hundreds of images that he does not need.
The possibility of being able to better manage sprites during a load from url will allow to be able to favor this option

Additional remarks

No response

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

No branches or pull requests

1 participant