Open 3D Engine LmbrCentral Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
LmbrCentral::AttachmentComponentRequests Class Referenceabstract

#include <AttachmentComponentBus.h>

Inherits AZ::ComponentBus.

Public Member Functions

virtual void Attach (AZ::EntityId targetId, const char *targetBoneName, const AZ::Transform &offset)=0
 
virtual void Detach ()=0
 The entity will detach from its target.
 
virtual void Reattach (bool detachFirst)=0
 
virtual void SetAttachmentOffset (const AZ::Transform &offset)=0
 Update entity's offset from target.
 
virtual const char * GetJointName ()=0
 Get the selected joint name.
 
virtual AZ::EntityId GetTargetEntityId ()=0
 Get the target entity Id.
 
virtual AZ::Transform GetOffset ()=0
 Get the transform offset.
 

Detailed Description

Messages serviced by the AttachmentComponent. The AttachmentComponent lets an entity "stick" to a particular bone on a target entity.

Member Function Documentation

◆ Attach()

virtual void LmbrCentral::AttachmentComponentRequests::Attach ( AZ::EntityId  targetId,
const char *  targetBoneName,
const AZ::Transform &  offset 
)
pure virtual

Change attachment target. The entity will detach from any previous target.

Parameters
targetIdAttach to this entity.
targetBoneNameAttach to this bone on target entity. If targetBone is not found then attach to target entity's transform origin.
offsetAttachment's offset from target.

◆ Reattach()

virtual void LmbrCentral::AttachmentComponentRequests::Reattach ( bool  detachFirst)
pure virtual

Trigger a detach followed by a re-attach using the currently setup targetId and bone name and offset. This can be used when an asset reloads for example.


The documentation for this class was generated from the following file: