2.0 Help

Joint Attachment Component

The joint attachment component is used to expose the animated position of a bone, such that you can attach objects there.

Component Properties

  • JointName: The name of the joint/bone of which you want to use the position as an attachment point. You can look up the bone names in the respective skeleton asset.

  • PositionOffset, RotationOffset: Additional local position and rotation offsets added to the bone location. The same could be achieved by adding another child game object with an offset, but using these properties is more efficient.

How To Use

Whenever an animated mesh receives a new pose, it passes that pose on to all interested components that are attached to the same object or any child object. The joint attachment component listens to this message and positions its owner game object at the relative position of the selected bone.

To attach an object to a certain bone, follow these steps:

  • Create an empty game object as a child of the animated mesh.

  • Add a joint attachment component to it.

  • Set its JointName property to the desired bone name. You can look up the bone name on the skeleton asset that is used by the animated mesh asset on the animated mesh component.

  • Add the desired object or component to the joint attachment object.

  • The local transform of the attachment object will be overwritten by the component when it receives an animation pose. Thus setting any values here doesn't have any useful effect during simulation. To see where your attachment ends up, you need to simulate the scene and an animation has to actively play on the animated mesh.

  • While the scene is simulating, you can use the position and rotation offset properties to tweak the exact location of the joint attachment.

See Also

Last modified: 09 June 2024