Open 3D Engine AtomLyIntegration 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.
AZ::Render::EditorAttachmentComponent Class Reference

#include <EditorAttachmentComponent.h>

Inherits AzToolsFramework::Components::EditorComponentBase.

Public Member Functions

 AZ_COMPONENT (EditorAttachmentComponent, "{DA6072FD-E696-47D8-81D9-1F77D3464200}", Base)
 
void BuildGameEntity (AZ::Entity *gameEntity) override
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static void GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided)
 
static void GetIncompatibleServices (AZ::ComponentDescriptor::DependencyArrayType &incompatible)
 
static void GetRequiredServices (AZ::ComponentDescriptor::DependencyArrayType &required)
 

Protected Member Functions

void Activate () override
 
void Deactivate () override
 
AZ::u32 OnTargetIdChanged ()
 
AZ::u32 OnTargetBoneChanged ()
 
AZ::u32 OnTargetOffsetChanged ()
 
AZ::u32 OnAttachedInitiallyChanged ()
 
AZ::u32 OnScaleSourceChanged ()
 
void AttachOrDetachAsNecessary ()
 Invoked when an attachment property changes.
 
AZStd::vector< AZStd::string > GetTargetBoneOptions () const
 For populating ComboBox.
 
AttachmentConfiguration CreateAttachmentConfiguration () const
 Create runtime configuration from editor configuration.
 
AZ::Transform GetTargetOffset () const
 Create AZ::Transform from position and rotation.
 

Protected Attributes

AZ::EntityId m_targetId
 Attach to this entity.
 
AZStd::string m_targetBoneName
 Attach to this bone on target entity.
 
AZ::Vector3 m_positionOffset = AZ::Vector3::CreateZero()
 Offset from target bone's position.
 
AZ::Vector3 m_rotationOffset = AZ::Vector3::CreateZero()
 Offset from target bone's rotation.
 
float m_uniformScaleOffset = 1.0f
 Offset from target entity's scale.
 
AttachmentConfiguration::ScaleSource m_scaleSource = AttachmentConfiguration::ScaleSource::WorldScale
 Observe scale information from the specified source.

 
bool m_attachedInitially = true
 
AZ::Render::BoneFollower m_boneFollower
 Implements actual attachment functionality.
 

Detailed Description

In-editor attachment component. AttachmentComponent

Member Data Documentation

◆ m_attachedInitially

bool AZ::Render::EditorAttachmentComponent::m_attachedInitially = true
protected

Whether to attach to target upon activation. If false, the entity remains detached until Attach() is called.


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