Kanda Interactions 0.7.1
Loading...
Searching...
No Matches
Attachable Struct Reference

Signals that an entity can be attached to another, following the transform of the entity it's attached to. More...

+ Inheritance diagram for Attachable:

Static Public Member Functions

static Attachable WithOwner (Entity owner, bool worldSpace=false)
 Creates an Attachable which is attached to a given owner.
 
static Attachable WithOffset (Entity owner, float3 positionOffset, quaternion rotationOffset, bool worldSpace=false)
 Creates an Attachable which is attached to a given owner with an offset.
 

Public Attributes

bool WorldSpace
 If true, the attachable will match the world position of the owner. This requires additional computation, so only use this if you don't expect the owner to be a root-level entity.
 
Entity Owner
 The entity that this Attachable is attached to.
 
float3 PositionOffset
 The position offset to the owner's position.
 
quaternion RotationOffset
 The rotation offset to the owner's rotation.
 

Properties

bool IsAttached [get]
 True if the Attachable is currently attached to an entity.
 

Detailed Description

Signals that an entity can be attached to another, following the transform of the entity it's attached to.

If you wish to temporarily control or optimize large quantities of attached entities, the component can be disabled and will stop updating while that is the case.

Member Function Documentation

◆ WithOffset()

static Attachable WithOffset ( Entity owner,
float3 positionOffset,
quaternion rotationOffset,
bool worldSpace = false )
inlinestatic

Creates an Attachable which is attached to a given owner with an offset.

Parameters
ownerThe entity to attach to.
positionOffsetThe relative position offset.
rotationOffsetThe relative rotation offset.
worldSpaceIf true, the attachable will match the owner's world space position.
Returns

◆ WithOwner()

static Attachable WithOwner ( Entity owner,
bool worldSpace = false )
inlinestatic

Creates an Attachable which is attached to a given owner.

Parameters
ownerThe entity to attach to.
worldSpaceIf true, the attachable will match the owner's world space position.

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