Astra Unity 2.6.6
Astra Unity Plugin
Astra.Asset.PoseItem Class Reference

Represents a individual rig pose for the AvatarItem this is part of More...

Inheritance diagram for Astra.Asset.PoseItem:

Public Member Functions

void Snapshot ()
 Sets the default value of the rig before applying this pose, so that it can be restored when the pose is deactivated
 
void GenerateFromCurrent ()
 Makes a snapshot and uses that snapshot as the "active" pose
 
void RestorePrevious ()
 Puts rig back into the position before being driven
 
void Drive ()
 Drives the current pose placing the rig in the requestd position, see also DrivePose(PoseTarget pose)
 
void DrivePose (PoseTarget pose, bool allowSnapshot=true)
 Apply the given PoseTarget to this AvatarItem, this rotates the rig More...
 
void HoldPose ()
 Activate this target pose by applying it to the AvatarItem's rig While being driven the pose will constantly lock in place during LateUpdate This means animations will not work while being held
 
void ReleasePose ()
 Restore the AvatarItem's rig to it's original pose (or the last pose in which the Snapshot funciton was called)
 
void Debug ()
 Print out information about this pose to the Unity Debug log
 
- Public Member Functions inherited from Astra.Asset.ItemBase
virtual CompoundItem FindParentCompound ()
 Find the parent CompoundItem which this Item is attached to, if it exists, otherwise null
 
virtual AvatarItem FindAvatarItem ()
 Returns the AvatarItem this item is attached to (if found, note may return null)
 
virtual RigItem FindRigItem ()
 Finds the current RigItem associated on this Avatar Hierarchy More...
 

Public Attributes

bool RestoreStateOnDestroy = false
 
bool UsePositions = false
 if true, not only rotate but also move the bones physical locations This is typically ONLY done with T-Pose to "reset" the figure for bindposes
 
bool SnapshotWhenDriven = true
 Do we store the current snapshot whenever we apply this pose this means when we call RestorePrevious or ReleasePose it will restore to the state we had when we triggered a drive or hold call
 

Protected Attributes

PoseTarget PoseDataSnapshot
 
PoseTarget _PoseDataTarget
 
bool _isApplied = false
 
bool _isHolding = false
 When true during update loop the PoseDataTarget will be driven, this will override things like animations
 
RigItem _rigItem
 
- Protected Attributes inherited from Astra.Asset.ItemBase
List< string > _trackingIds = null
 

Properties

PoseTarget PoseDataTarget [getset]
 
RigItem rigItem [get]
 Rig item tied to this PoseItem
 
bool IsHolding [get]
 
bool CanDrive [get]
 
bool CanRestore [get]
 
- Properties inherited from Astra.Asset.ItemBase
virtual McsSdk20.Primitives.AstraPrimitiveType PrimitiveType [get]
 Retrieve the primitive type for this item
 
virtual McsSdk20.Primitives.SchematicType SchematicType [get]
 Retrieve the schematic type for this item
 
string AstraGuid [getset]
 Guid for this item to identify it in the Astra Service
 
string AstraName [getset]
 Display name for this item
 
string AstraInstanceId [getset]
 Guid representing an instance of this item
 
- Properties inherited from Astra.Asset.IAstraBaseInterface
string AstraGuid [getset]
 
string AstraName [getset]
 
string AstraInstanceId [getset]
 

Additional Inherited Members

- Protected Member Functions inherited from Astra.Asset.ItemBase
void TrackId (string id)
 
void UntrackIds ()
 

Detailed Description

Represents a individual rig pose for the AvatarItem this is part of

Member Function Documentation

◆ DrivePose()

void Astra.Asset.PoseItem.DrivePose ( PoseTarget  pose,
bool  allowSnapshot = true 
)
inline

Apply the given PoseTarget to this AvatarItem, this rotates the rig

Parameters
poseThe pose you want the rig to take on
allowSnapshotIf true and "SnapshotWhenDriven" is also true the PoseDataSnapshot will be recorded before the bones are adjusted

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