How to prevent nodes attached to bones from scaling

I am using the standard mechanism to attach a node (representing an item) to an animated character:

Node boneNode = SkeletonControl.getAttachmentsNode(boneName);

My issue is that I am scaling the model to represent the configurable height of a character. That is automatically scaling the attached item node which is not what I want because I don’t want the items to become smaller just because they are picked up by a smaller character.

Is there a way for me to prevent the scale of the attached item node from inheriting the scale of its parent bone node?


1 Like

itemNode.setLocalScale(1f / boneNode.getWorldScale().x); ?

…or if you want to support non-uniform scaling (even though JME doesn’t really support it like this):

1 Like