• Editor
  • About point attachment under a skin

I could drag a Point Attachment inside a skin placeholder but when changing skins, that Point will still be visible. Seems like not the default behavior like other normal attachment. Is point assign to skin broken?

I want to use point to mark some special positions which is exclusive to certain skins (characters). e.g. Point with same name under same skin placeholder is at two different positions. You can imaging different characters use different positions to emit bullets but they all has a Point Attachment called 'EmitFrom'.
Assuming point can be under a skin and is currently broken, in the game, will I always be able to access the points even if it is not belongs to active skin or will they just be hidden? If they are not hidden, is there anyway I could check if the point is belonging to another skin so that I can ignore them?

Thanks

I'm not seeing that behavior. When I change skins, the point attachment is gone. Can you post a project showing the problem?

You can always grab a point attachment at runtime, from whichever skin it is in. You can also call PointAttachment computeWorldPosition and PointAttachment computeWorldRotation at any time, even if the point attachment is not visible. However, it is most common to get the point attachment from the skeleton's current skin placeholder using Skeleton getAttachment. That way if the skin changes, the point you get changes. For example:

PointAttachment point = skeleton.getAttachment("slotName", "skinPlaceholderName");
vec2 position = point.computeWorldPosition(bone);
float rotation = point.computeWorldRotation(bone);

Ah, sorry my bad. I just realized I forgot to turn off the "show all skin attachment" setting.
Thanks for the point usage explanation.