Quantcast
Channel: Community | MonoGame - Latest topics
Viewing all articles
Browse latest Browse all 6821

How to use custom reference points in sprites?

$
0
0

@Tobias_Endres wrote:

I am using TexturePacker to generate my sprite-sheet and texture-atlas file (using the JSON output format). Alongside that I have a ".aa" file describing my animations which I manually created. This setup is pretty much as it is done with the zombie-animations in the demo and works great (after I have learned that sprite-rotating is not supported by MonoGame.Extended currently).

Now for some animations I need to specify reference points in the frame to render other sprites to. For example when picking up objects, displaying a weapon or showing effects. I am aware of pivot-points in TexturePacker, but as far as I understood, this is used for other purposes and is limited to one point per frame. In fact I need to be able to setup multiple custom points (or even areas) per frame.

I am wondering how this could be done most efficiently. I do not see anything that fits my needs in the ".aa" format or the texture-atlas. So my best guess is to add the attributes I need to the ".aa" file and extend the currently used "Astrid Animator Importer/Processor". However this means manually adjusting these points whenever the sprites change and overriding the Importer/Processor seems no easy task to me. Also to me setting these reference points in a sprite seems such a basic functionality that I guess there has to be a best-practice way on how to do this. Maybe I am currently thinking in the wrong direction. How are you handling reference-points in your 2D animations?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles