Search Results for

    Show / Hide Table of Contents

    Class AnimatedModel

    Performs an animation and renders a skinned model.

    Inheritance
    Object
    ScriptingObject
    SceneObject
    Actor
    ModelInstanceActor
    AnimatedModel
    Inherited Members
    Actor::_box
    Actor::_drawCategory
    Actor::_drawNoCulling
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    Actor::_isActive
    Actor::_isActiveInHierarchy
    Actor::_isEnabled
    Actor::_isHierarchyDirty
    Actor::_isPrefabRoot
    Actor::_layer
    Actor::_localTransform
    Actor::_name
    SceneObject::_parent
    Actor::_physicsScene
    SceneObject::_prefabID
    SceneObject::_prefabObjectID
    Actor::_scene
    ModelInstanceActor::_sceneRenderingKey
    Actor::_sphere
    Actor::_staticFlags
    Actor::_transform
    ScriptingObject::_type
    Actor::AddMovement(const Vector3& translation)
    Actor::AddMovement(const Vector3& translation, const Quaternion& rotation)
    Actor::AddScript()
    Actor::AddStaticFlags(StaticFlags flags)
    Actor::AddTag(const Tag& tag)
    Actor::AddTagRecursive(const Tag& tag)
    AnimatedModel
    Actor::BreakPrefabLink()
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    Actor::ChangeScriptOrder(Script* script, int32 newIndex)
    Actor::Children
    Actor::Clone()
    ModelInstanceActor::CreateAndSetVirtualMaterialInstance(int32 entryIndex)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    Actor::DEPRECATED("Use HasTag instead") const String& GetTag()
    Actor::DEPRECATED("Use AddTag instead") void SetTag(const StringView& value)
    ISerializable::DeserializeIfExists(DeserializeStream& stream, const char* memberName, ISerializeModifier* modifier)
    AnimatedModel
    Actor::DestroyChildren(float timeLeft = 0.0f)
    ScriptingObject::DestroyManaged()
    ModelInstanceActor::Entries
    Actor::FindActor(const StringView& name)
    Actor::FindActor(const MClass* type, bool activeOnly=false)
    Actor::FindActor(const MClass* type, const StringView& name)
    Actor::FindActor(const MClass* type, const Tag& tag, bool activeOnly=false)
    Actor::FindActor()
    Actor::FindActor(const Tag& tag)
    Actor::FindScript(const MClass* type)
    Actor::FindScript()
    Object::Flags
    Actor::FromBytes(const Span<byte>& data, Array<Actor* >& output, ISerializeModifier* modifier)
    Actor::FromBytes(const Span<byte>& data)
    Actor::FromBytes(const Span<byte>& data, const Dictionary<Guid, Guid, HeapAllocation>& idsMapping)
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    Actor::FromJson(const StringAnsiView& json)
    Actor::GetBox()
    Actor::GetBoxWithChildren()
    Actor::GetChild(int32 index)
    Actor::GetChild(const StringView& name)
    Actor::GetChild(const MClass* type)
    Actor::GetChild()
    Actor::GetChildren(const MClass* type)
    Actor::GetChildren()
    Actor::GetChildrenCount()
    ScriptingObject::GetClass()
    Actor::GetDirection()
    Actor::GetEditorBoxChildren()
    ModelInstanceActor::GetEntries()
    ScriptingObject::GetID()
    Actor::GetIsActive()
    Actor::GetLayer()
    Actor::GetLayerMask()
    Actor::GetLayerName()
    Actor::GetLocalOrientation()
    Actor::GetLocalPosition()
    Actor::GetLocalScale()
    Actor::GetLocalToWorldMatrix(Matrix& localToWorld)
    Actor::GetLocalToWorldMatrix(Double4x4& localToWorld)
    Actor::GetLocalTransform()
    ScriptingObject::GetManagedInstance()
    Actor::GetName()
    SceneObject::GetNamePath(Char separatorChar='/')
    Actor::GetOrAddChild()
    ScriptingObject::GetOrCreateManagedInstance()
    Actor::GetOrderInParent()
    Actor::GetOrientation()
    SceneObject::GetParent()
    Actor::GetPerInstanceRandom()
    Actor::GetPhysicsScene()
    Actor::GetPosition()
    SceneObject::GetPrefabID()
    SceneObject::GetPrefabObjectID()
    Actor::GetPrefabRoot()
    Actor::GetRotation()
    Actor::GetScale()
    Actor::GetScene()
    Actor::GetSceneObjectId()
    Actor::GetSceneRendering()
    Actor::GetScript(int32 index)
    Actor::GetScript(const MClass* type)
    Actor::GetScript()
    Actor::GetScriptByID(const Guid& id)
    Actor::GetScripts(const MClass* type)
    Actor::GetScripts()
    Actor::GetScriptsCount()
    Actor::GetSphere()
    Actor::GetStaticFlags()
    Actor::GetTransform()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Actor::GetWorldToLocalMatrix(Matrix& worldToLocal)
    Actor::GetWorldToLocalMatrix(Double4x4& worldToLocal)
    Actor::HasActorInChildren(Actor* a)
    Actor::HasActorInHierarchy(Actor* a)
    ScriptingObject::HasManagedInstance()
    SceneObject::HasParent()
    SceneObject::HasPrefabLink()
    Actor::HasScene()
    Actor::HasStaticFlag(StaticFlags flag)
    Actor::HasTag()
    Actor::HasTag(const Tag& tag)
    Actor::HasTag(const StringView& tag)
    Actor::HideFlags
    Actor::Initialize()
    Actor::InitializeHierarchy()
    Actor::Intersects(const Ray& ray, Real& distance, Vector3& normal)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Actor::IsActiveInHierarchy()
    SceneObject::IsDuringPlay()
    Actor::IsPrefabRoot()
    ScriptingObject::IsRegistered()
    Actor::IsStatic()
    Actor::IsTransformStatic()
    Actor::LinkPrefab(const Guid& prefabId, const Guid& prefabObjectId)
    Actor::LookAt(const Vector3& worldPos)
    Actor::LookAt(const Vector3& worldPos, const Vector3& worldUp)
    Actor::LookingAt(const Vector3& worldPos)
    Actor::LookingAt(const Vector3& worldPos, const Vector3& worldUp)
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    Actor::OnActiveChanged()
    Actor::OnBeginPlay()
    Actor::OnEndPlay()
    ModelInstanceActor::OnLayerChanged()
    ScriptingObject::OnManagedInstanceDeleted()
    Actor::OnOrderInParentChanged()
    Actor::OnParentChanged()
    Actor::OnPhysicsSceneChanged(PhysicsScene* previous)
    ScriptingObject::OnScriptingDispose()
    ModelInstanceActor::OnStaticFlagsChanged()
    ModelInstanceActor::OnTransformChanged()
    ScriptingObject::RegisterObject()
    Actor::RemoveStaticFlags(StaticFlags flags)
    Actor::RemoveTag(const Tag& tag)
    Actor::ResetLocalTransform()
    SceneObject::SceneObject(const SpawnParams& params)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    Actor::Scripts
    AnimatedModel
    AnimatedModel
    Actor::SetDirection(const Float3& value)
    ModelInstanceActor::SetEntries(const Array<ModelInstanceEntry>& value)
    Actor::SetIsActive(bool value)
    Actor::SetLayer(int32 layerIndex)
    Actor::SetLayerName(const StringView& value)
    Actor::SetLayerNameRecursive(const StringView& value)
    Actor::SetLayerRecursive(int32 layerIndex)
    Actor::SetLocalOrientation(const Quaternion& value)
    Actor::SetLocalPosition(const Vector3& value)
    Actor::SetLocalScale(const Float3& value)
    Actor::SetLocalTransform(const Transform& value)
    ScriptingObject::SetManagedInstance(MObject* instance)
    ModelInstanceActor::SetMaterial(int32 entryIndex, MaterialBase* material)
    Actor::SetName(String&& value)
    Actor::SetName(const StringView& value)
    Actor::SetOrderInParent(int32 index)
    Actor::SetOrientation(const Quaternion& value)
    Actor::SetParent(Actor* value, bool worldPositionsStays, bool canBreakPrefabLink)
    Actor::SetParent(Actor* value, bool canBreakPrefabLink=true)
    SceneObject::SetParent(Actor* value)
    Actor::SetPhysicsScene(PhysicsScene* scene)
    Actor::SetPosition(const Vector3& value)
    Actor::SetRotation(const Matrix& value)
    Actor::SetScale(const Float3& value)
    Actor::SetStaticFlag(StaticFlags flag, bool value)
    Actor::SetStaticFlags(StaticFlags value)
    Actor::SetTransform(const Transform& value)
    AnimatedModel
    Actor::Tags
    Actor::ToBytes(const Array<Actor* >& actors, MemoryWriteStream& output)
    Actor::ToBytes(const Array<Actor* >& actors)
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    Actor::ToJson()
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Actor::ToString()
    Actor::TreeExecute(Function<bool(Actor* , Params ...)>& action, Params ... args)
    Actor::TreeExecuteChildren(Function<bool(Actor* , Params ...)>& action, Params ... args)
    Actor::TryGetSerializedObjectsIds(const Span<byte>& data)
    ScriptingObject::UnregisterObject()
    Actor::UnregisterObjectHierarchy()
    ISerializable::~ISerializable()
    Object::~Object()
    SceneObject::~SceneObject()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Level/Actors/AnimatedModel.h
    Syntax
    public class AnimatedModel : public ModelInstanceActor

    Constructors

    ~AnimatedModel()

    Declaration
    public ~AnimatedModel()

    DEPRECATED()

    The shadows casting mode. [Deprecated on 26.10.2022, expires on 26.10.2024]

    Declaration
    public DEPRECATED() ShadowsCastingMode ShadowsMode

    Fields

    AnimationGraph

    The animation graph asset used for the skinned mesh skeleton bones evaluation (controls the animation).

    Declaration
    public AssetReference<AnimationGraph> AnimationGraph
    Field Value
    AssetReference<AnimationGraph>

    AnimationUpdated

    Called after animation gets updated (new skeleton pose).

    Declaration
    public Action AnimationUpdated
    Field Value
    Action

    BoundsScale

    The master scale parameter for the actor bounding box. Helps reducing mesh flickering effect on screen edges.

    Declaration
    public float BoundsScale = 1.5f
    Field Value
    float

    CustomBounds

    The custom bounds(in actor local space). If set to empty bounds then source skinned model bind pose bounds will be used.

    Declaration
    public BoundingBox CustomBounds = BoundingBox::Zero
    Field Value
    BoundingBox

    DrawModes

    The draw passes to use for rendering this object.

    Declaration
    public DrawPass DrawModes = DrawPass::Default
    Field Value
    DrawPass

    ForcedLOD

    Gets the model forced Level Of Detail index. Allows to bind the given model LOD to show. Value -1 disables this feature.

    Declaration
    public int32 ForcedLOD = -1
    Field Value
    int32

    GraphInstance

    The graph instance data container. For dynamic usage only at runtime, not serialized.

    Declaration
    public AnimGraphInstanceData GraphInstance
    Field Value
    AnimGraphInstanceData

    LODBias

    The model Level Of Detail bias value. Allows to increase or decrease rendered model quality.

    Declaration
    public int32 LODBias = 0
    Field Value
    int32

    PerBoneMotionBlur

    If true, use per-bone motion blur on this skeletal model. It requires additional rendering, can be disabled to save performance.

    Declaration
    public bool PerBoneMotionBlur = true
    Field Value
    bool

    RootMotionTarget

    The animation root motion apply target. If not specified the animated model will apply it itself.

    Declaration
    public ScriptingObjectReference<Actor> RootMotionTarget
    Field Value
    ScriptingObjectReference<Actor>

    ShowDebugDrawSkeleton

    If checked, the skeleton pose will be shawn during debug shapes drawing.

    Declaration
    public bool ShowDebugDrawSkeleton = false
    Field Value
    bool

    SkinnedModel

    The skinned model asset used for rendering.

    Declaration
    public AssetReference<SkinnedModel> SkinnedModel
    Field Value
    AssetReference<SkinnedModel>

    SortOrder

    The object sort order key used when sorting drawable objects during rendering. Use lower values to draw object before others, higher values are rendered later (on top). Can be used to control transparency drawing.

    Declaration
    public int8 SortOrder = 0
    Field Value
    int8

    UpdateMode

    The animation update mode. Can be used to optimize the performance.

    Declaration
    public AnimationUpdateMode UpdateMode = AnimationUpdateMode::Auto
    Field Value
    AnimationUpdateMode

    UpdateSpeed

    The animation update delta time scale. Can be used to speed up animation playback or create slow motion effect.

    Declaration
    public float UpdateSpeed = 1.0f
    Field Value
    float

    UpdateWhenOffscreen

    If true, the animation will be updated even when an actor cannot be seen by any camera. Otherwise, the animations themselves will also stop running when the actor is off-screen.

    Declaration
    public bool UpdateWhenOffscreen = false
    Field Value
    bool

    UseTimeScale

    If true, animation speed will be affected by the global time scale parameter.

    Declaration
    public bool UseTimeScale = true
    Field Value
    bool

    Methods

    BeginPlay(SceneBeginData* data)

    Called when adding object to the game.

    Declaration
    protected virtual void BeginPlay(SceneBeginData* data) override
    Parameters
    SceneBeginData data

    The initialization data (e.g. used to collect joints to link after begin).

    Overrides
    Actor::BeginPlay(SceneBeginData* data)

    ClearBlendShapeWeights()

    Clears the weights of the blend shapes (disables any used blend shapes).

    Declaration
    public void ClearBlendShapeWeights()

    Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    Deserializes object from the input stream.

    Declaration
    public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
    Parameters
    DeserializeStream stream

    The input stream.

    ISerializeModifier modifier

    The deserialization modifier object. Always valid.

    Overrides
    Actor::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    Draw(RenderContext& renderContext)

    Draws this actor. Called by Scene Rendering service. This call is more optimized than generic Draw (eg. geometry is rendered during all pass types but other actors are drawn only during GBufferFill pass).

    Declaration
    public virtual void Draw(RenderContext& renderContext) override
    Parameters
    RenderContext renderContext

    The rendering context.

    Overrides
    Actor::Draw(RenderContext& renderContext)

    Draw(RenderContextBatch& renderContextBatch)

    Draws this actor. Called by Scene Rendering service. This call is more optimized than generic Draw (eg. geometry is rendered during all pass types but other actors are drawn only during GBufferFill pass).

    Declaration
    public virtual void Draw(RenderContextBatch& renderContextBatch) override
    Parameters
    RenderContextBatch renderContextBatch

    The rendering context batch (eg, main view and shadow projections).

    Overrides
    Actor::Draw(RenderContextBatch& renderContextBatch)

    EndPlay()

    Called when removing object from the game.

    Declaration
    protected virtual void EndPlay() override
    Overrides
    Actor::EndPlay()

    FindClosestNode(const Vector3& location, bool worldSpace=false)

    Finds the closest node to a given location.

    Declaration
    public int32 FindClosestNode(const Vector3& location, bool worldSpace=false) const
    Parameters
    Vector3 location

    The text location (in local-space of the actor or world-space depending on worldSpace ).

    bool worldSpace

    True if convert input location is in world-space, otherwise it's in local-space of the actor.

    Returns
    int32

    The zero-based index of the found node. Returns -1 if skeleton is missing.

    GetBlendShapeWeight(const StringView& name)

    Gets the weight of the blend shape.

    Declaration
    public float GetBlendShapeWeight(const StringView& name)
    Parameters
    StringView name

    The blend shape name.

    Returns
    float

    The normalized weight of the blend shape (in range -1:1).

    GetCurrentPose(Array<Matrix>& nodesTransformation, bool worldSpace=false)

    Gets the per-node final transformations (skeleton pose).

    Declaration
    public void GetCurrentPose(Array<Matrix>& nodesTransformation, bool worldSpace=false) const
    Parameters
    Array<Matrix> nodesTransformation

    The output per-node final transformation matrices.

    bool worldSpace

    True if convert matrices into world-space, otherwise returned values will be in local-space of the actor.

    GetEditorBox()

    Gets actor bounding box (single actor, no children included) for editor tools.

    Declaration
    public virtual BoundingBox GetEditorBox() const override
    Returns
    BoundingBox

    Overrides
    Actor::GetEditorBox()

    GetEnableTracing()

    Enables extracting animation playback insights for debugging or custom scripting.

    Declaration
    public bool GetEnableTracing() const
    Returns
    bool

    GetMaterial(int32 entryIndex)

    Gets the material used to draw the meshes which are assigned to that slot (set in Entries or model's default).

    Declaration
    public virtual MaterialBase* GetMaterial(int32 entryIndex) override
    Parameters
    int32 entryIndex

    The material slot entry index.

    Returns
    MaterialBase

    Overrides
    ModelInstanceActor::GetMaterial(int32 entryIndex)

    GetMaterialSlots()

    Gets the material slots array set on the asset (eg. model or skinned model asset).

    Declaration
    public virtual Span<MaterialSlot> GetMaterialSlots() const override
    Returns
    Span<MaterialSlot>

    Overrides
    ModelInstanceActor::GetMaterialSlots()

    GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout* *layout)

    Extracts mesh buffer data from CPU. Might be cached internally (eg. by Model/SkinnedModel).

    Declaration
    public virtual bool GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout* *layout) const override
    Parameters
    MeshReference ref

    Mesh reference.

    MeshBufferType type

    Buffer type

    BytesContainer result

    The result data

    int32 count

    The amount of items inside the result buffer.

    GPUVertexLayout layout

    The result layout of the result buffer (for vertex buffers). Optional, pass null to ignore it.

    Returns
    bool

    True if failed, otherwise false.

    Overrides
    ModelInstanceActor::GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout* *layout=nullptr)

    GetMeshDeformation()

    Gets the mesh deformation utility for this model instance (optional).

    Declaration
    public virtual MeshDeformation* GetMeshDeformation() const override
    Returns
    MeshDeformation

    Model deformation utility or null if not supported.

    Overrides
    ModelInstanceActor::GetMeshDeformation()

    GetNodeTransformation(const StringView& nodeName, Matrix& nodeTransformation, bool worldSpace=false)

    Gets the node final transformation.

    Declaration
    public void GetNodeTransformation(const StringView& nodeName, Matrix& nodeTransformation, bool worldSpace=false) const
    Parameters
    StringView nodeName

    The name of the skinned model skeleton node.

    Matrix nodeTransformation

    The output final node transformation matrix.

    bool worldSpace

    True if convert matrices into world-space, otherwise returned values will be in local-space of the actor.

    GetNodeTransformation(int32 nodeIndex, Matrix& nodeTransformation, bool worldSpace=false)

    Gets the node final transformation.

    Declaration
    public void GetNodeTransformation(int32 nodeIndex, Matrix& nodeTransformation, bool worldSpace=false) const
    Parameters
    int32 nodeIndex

    The index of the skinned model skeleton node.

    Matrix nodeTransformation

    The output final node transformation matrix.

    bool worldSpace

    True if convert matrices into world-space, otherwise returned values will be in local-space of the actor.

    GetParameter(const StringView& name)

    Gets the anim graph instance parameter by name.

    Declaration
    public AnimGraphParameter* GetParameter(const StringView& name)
    Parameters
    StringView name

    The parameter name.

    Returns
    AnimGraphParameter

    The parameters.

    GetParameters()

    Gets the anim graph instance parameters collection.

    Declaration
    public Array<AnimGraphParameter> GetParameters() const
    Returns
    Array<AnimGraphParameter>

    GetParameterValue(const Guid& id)

    Gets the anim graph instance parameter value.

    Declaration
    public Variant GetParameterValue(const Guid& id) const
    Parameters
    Guid id

    The parameter id.

    Returns
    Variant

    The value.

    GetParameterValue(const StringView& name)

    Gets the anim graph instance parameter value.

    Declaration
    public Variant GetParameterValue(const StringView& name) const
    Parameters
    StringView name

    The parameter name.

    Returns
    Variant

    The value.

    GetTraceEvents()

    Gets the trace events from the last animation update. Valid only when EnableTracing is active.

    Declaration
    public Array<AnimGraphTraceEvent> GetTraceEvents() const
    Returns
    Array<AnimGraphTraceEvent>

    HasContentLoaded()

    Returns true if actor has loaded content.

    Declaration
    public virtual bool HasContentLoaded() const override
    Returns
    bool

    Overrides
    Actor::HasContentLoaded()

    IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex)

    Determines if there is an intersection between the model actor mesh entry and a ray. If mesh data is available on the CPU performs exact intersection check with the geometry. Otherwise performs simple BoundingBox vs Ray test. For more efficient collisions detection and ray casting use physics.

    Declaration
    public virtual bool IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex) override
    Parameters
    Ray ray

    The ray to test.

    Real distance

    When the method completes and returns true, contains the distance of the intersection (if any valid).

    Vector3 normal

    When the method completes, contains the intersection surface normal vector (if any valid).

    int32 entryIndex

    When the method completes, contains the intersection entry index (if any valid).

    Returns
    bool

    True if the actor is intersected by the ray, otherwise false.

    Overrides
    ModelInstanceActor::IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex)

    IntersectsEntry(int32 entryIndex, const Ray& ray, Real& distance, Vector3& normal)

    Determines if there is an intersection between the model actor mesh entry and a ray. If mesh data is available on the CPU performs exact intersection check with the geometry. Otherwise performs simple BoundingBox vs Ray test. For more efficient collisions detection and ray casting use physics.

    Declaration
    public virtual bool IntersectsEntry(int32 entryIndex, const Ray& ray, Real& distance, Vector3& normal) override
    Parameters
    int32 entryIndex

    The material slot entry index to test.

    Ray ray

    The ray to test.

    Real distance

    When the method completes and returns true, contains the distance of the intersection (if any valid).

    Vector3 normal

    When the method completes, contains the intersection surface normal vector (if any valid).

    Returns
    bool

    True if the actor is intersected by the ray, otherwise false.

    Overrides
    ModelInstanceActor::IntersectsEntry(int32 entryIndex, const Ray& ray, Real& distance, Vector3& normal)

    IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)

    Determines if there is an intersection between the current object and a ray.

    Declaration
    public virtual bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override
    Parameters
    Ray ray

    The ray to test.

    Real distance

    When the method completes, contains the distance of the intersection (if any valid).

    Vector3 normal

    When the method completes, contains the intersection surface normal vector (if any valid).

    Returns
    bool

    True whether the two objects intersected, otherwise false.

    Overrides
    Actor::IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)

    IsPlayingSlotAnimation()

    Checks if the any animation playback is active on the any slot in Anim Graph (not paused).

    Declaration
    public bool IsPlayingSlotAnimation()
    Returns
    bool

    IsPlayingSlotAnimation(const StringView& slotName, Animation* anim)

    Checks if the animation playback is active on the slot in Anim Graph (not paused).

    Declaration
    public bool IsPlayingSlotAnimation(const StringView& slotName, Animation* anim)
    Parameters
    StringView slotName

    The name of the slot.

    Animation anim

    The animation to check.

    Returns
    bool

    OnActiveInTreeChanged()

    Called when actor active in tree state gets changed.

    Declaration
    protected virtual void OnActiveInTreeChanged() override
    Overrides
    Actor::OnActiveInTreeChanged()

    OnDebugDraw()

    Draws debug shapes for the actor and all child scripts.

    Declaration
    public virtual void OnDebugDraw() override
    Overrides
    Actor::OnDebugDraw()

    OnDebugDrawSelected()

    Draws debug shapes for the selected actor and all child scripts.

    Declaration
    public virtual void OnDebugDrawSelected() override
    Overrides
    Actor::OnDebugDrawSelected()

    OnDeleteObject()

    Deletes the object. Called by the ObjectsRemovalService. Can be overriden to provide custom logic per object (cleanup, etc.).

    Declaration
    public virtual void OnDeleteObject() override
    Overrides
    Actor::OnDeleteObject()

    OnDisable()

    Called when actor gets removed from game systems. Occurs on EndPlay event or when actor gets inactivated in hierarchy. Use this event to unregister object from other game system (eg. audio).

    Declaration
    protected virtual void OnDisable() override
    Overrides
    Actor::OnDisable()

    OnEnable()

    Called when actor gets added to game systems. Occurs on BeginPlay event or when actor gets activated in hierarchy. Use this event to register object to other game system (eg. audio).

    Declaration
    protected virtual void OnEnable() override
    Overrides
    Actor::OnEnable()

    PauseSlotAnimation()

    Pauses all the animations playback on the all slots in Anim Graph.

    Declaration
    public void PauseSlotAnimation()

    PauseSlotAnimation(const StringView& slotName, Animation* anim)

    Pauses the animation playback on the slot in Anim Graph.

    Declaration
    public void PauseSlotAnimation(const StringView& slotName, Animation* anim)
    Parameters
    StringView slotName

    The name of the slot.

    Animation anim

    The animation to pause.

    PlaySlotAnimation(const StringView& slotName, Animation* anim, float speed=1.0f, float blendInTime = 0.2f, float blendOutTime = 0.2f, int32 loopCount = 0)

    Plays the animation on the slot in Anim Graph.

    Declaration
    public void PlaySlotAnimation(const StringView& slotName, Animation* anim, float speed=1.0f, float blendInTime = 0.2f, float blendOutTime = 0.2f, int32 loopCount = 0)
    Parameters
    StringView slotName

    The name of the slot.

    Animation anim

    The animation to play.

    float speed

    The playback speed.

    float blendInTime

    The animation blending in time (in seconds). Cam be used to smooth the slot animation playback with the input pose when starting the animation.

    float blendOutTime

    The animation blending out time (in seconds). Cam be used to smooth the slot animation playback with the input pose when ending animation.

    int32 loopCount

    The amount of loops to play the animation: 0 to play once, -1 to play infinite, 1 or higher to loop once or more.

    PreInitSkinningData()

    Creates and setups the skinning data (writes the identity bones transformations).

    Declaration
    public void PreInitSkinningData()

    ResetAnimation()

    Resets the animation state (clears the instance state data but preserves the instance parameters values).

    Declaration
    public void ResetAnimation()

    Serialize(SerializeStream& stream, const void* otherObj)

    Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.

    Declaration
    public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
    Parameters
    SerializeStream stream

    The output stream.

    void otherObj

    The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties.

    Overrides
    Actor::Serialize(SerializeStream& stream, const void* otherObj)

    SetBlendShapeWeight(const StringView& name, float value)

    Sets the weight of the blend shape.

    Declaration
    public void SetBlendShapeWeight(const StringView& name, float value)
    Parameters
    StringView name

    The blend shape name.

    float value

    The normalized weight of the blend shape (in range -1:1).

    SetCurrentPose(const Array<Matrix>& nodesTransformation, bool worldSpace=false)

    Sets the per-node final transformations (skeleton pose).

    Declaration
    public void SetCurrentPose(const Array<Matrix>& nodesTransformation, bool worldSpace=false)
    Parameters
    Array<Matrix> nodesTransformation

    The per-node final transformation matrices.

    bool worldSpace

    True if convert matrices from world-space, otherwise values are in local-space of the actor.

    SetEnableTracing(bool value)

    Enables extracting animation playback insights for debugging or custom scripting.

    Declaration
    public void SetEnableTracing(bool value)
    Parameters
    bool value

    SetMasterPoseModel(AnimatedModel* masterPose)

    Sets the master pose model that will be used to copy the skeleton nodes animation. Useful for modular characters.

    Declaration
    public void SetMasterPoseModel(AnimatedModel* masterPose)
    Parameters
    AnimatedModel masterPose

    The master pose actor to use.

    SetNodeTransformation(const StringView& nodeName, const Matrix& nodeTransformation, bool worldSpace=false)

    Sets the node final transformation. If multiple nodes are to be set within a frame, do not use set worldSpace to true, and do the conversion yourself to avoid recalculation of inv matrices.

    Declaration
    public void SetNodeTransformation(const StringView& nodeName, const Matrix& nodeTransformation, bool worldSpace=false)
    Parameters
    StringView nodeName

    The name of the skinned model skeleton node.

    Matrix nodeTransformation

    The final node transformation matrix.

    bool worldSpace

    True if convert matrices from world-space, otherwise values will be in local-space of the actor.

    SetNodeTransformation(int32 nodeIndex, const Matrix& nodeTransformation, bool worldSpace=false)

    Sets the node final transformation. If multiple nodes are to be set within a frame, do not use set worldSpace to true, and do the conversion yourself to avoid recalculation of inv matrices.

    Declaration
    public void SetNodeTransformation(int32 nodeIndex, const Matrix& nodeTransformation, bool worldSpace=false)
    Parameters
    int32 nodeIndex

    The index of the skinned model skeleton node.

    Matrix nodeTransformation

    The final node transformation matrix.

    bool worldSpace

    True if convert matrices from world-space, otherwise values will be in local-space of the actor.

    SetParameterValue(const Guid& id, const Variant& value)

    Sets the anim graph instance parameter value.

    Declaration
    public void SetParameterValue(const Guid& id, const Variant& value)
    Parameters
    Guid id

    The parameter id.

    Variant value

    The value to set.

    SetParameterValue(const StringView& name, const Variant& value)

    Sets the anim graph instance parameter value.

    Declaration
    public void SetParameterValue(const StringView& name, const Variant& value)
    Parameters
    StringView name

    The parameter name.

    Variant value

    The value to set.

    SetupSkinningData()

    Validates and creates a proper skinning data.

    Declaration
    public void SetupSkinningData()

    StopSlotAnimation()

    Stops all the animations playback on the all slots in Anim Graph.

    Declaration
    public void StopSlotAnimation()

    StopSlotAnimation(const StringView& slotName, Animation* anim)

    Stops the animation playback on the slot in Anim Graph.

    Declaration
    public void StopSlotAnimation(const StringView& slotName, Animation* anim)
    Parameters
    StringView slotName

    The name of the slot.

    Animation anim

    The animation to stop.

    UpdateAnimation()

    Performs the full animation update. The actual update will be performed during gameplay tick.

    Declaration
    public void UpdateAnimation()

    UpdateBounds()

    Updates the model bounds (eg. when mesh has applied significant deformation).

    Declaration
    public virtual void UpdateBounds() override
    Overrides
    ModelInstanceActor::UpdateBounds()

    WaitForModelLoad()

    Declaration
    protected virtual void WaitForModelLoad() override
    Overrides
    ModelInstanceActor::WaitForModelLoad()
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • ~AnimatedModel()
      • DEPRECATED()
    • Fields
      • AnimationGraph
      • AnimationUpdated
      • BoundsScale
      • CustomBounds
      • DrawModes
      • ForcedLOD
      • GraphInstance
      • LODBias
      • PerBoneMotionBlur
      • RootMotionTarget
      • ShowDebugDrawSkeleton
      • SkinnedModel
      • SortOrder
      • UpdateMode
      • UpdateSpeed
      • UpdateWhenOffscreen
      • UseTimeScale
    • Methods
      • BeginPlay(SceneBeginData* data)
      • ClearBlendShapeWeights()
      • Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
      • Draw(RenderContext& renderContext)
      • Draw(RenderContextBatch& renderContextBatch)
      • EndPlay()
      • FindClosestNode(const Vector3& location, bool worldSpace=false)
      • GetBlendShapeWeight(const StringView& name)
      • GetCurrentPose(Array<Matrix>& nodesTransformation, bool worldSpace=false)
      • GetEditorBox()
      • GetEnableTracing()
      • GetMaterial(int32 entryIndex)
      • GetMaterialSlots()
      • GetMeshData(const MeshReference& ref, MeshBufferType type, BytesContainer& result, int32& count, GPUVertexLayout* *layout)
      • GetMeshDeformation()
      • GetNodeTransformation(const StringView& nodeName, Matrix& nodeTransformation, bool worldSpace=false)
      • GetNodeTransformation(int32 nodeIndex, Matrix& nodeTransformation, bool worldSpace=false)
      • GetParameter(const StringView& name)
      • GetParameters()
      • GetParameterValue(const Guid& id)
      • GetParameterValue(const StringView& name)
      • GetTraceEvents()
      • HasContentLoaded()
      • IntersectsEntry(const Ray& ray, Real& distance, Vector3& normal, int32& entryIndex)
      • IntersectsEntry(int32 entryIndex, const Ray& ray, Real& distance, Vector3& normal)
      • IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
      • IsPlayingSlotAnimation()
      • IsPlayingSlotAnimation(const StringView& slotName, Animation* anim)
      • OnActiveInTreeChanged()
      • OnDebugDraw()
      • OnDebugDrawSelected()
      • OnDeleteObject()
      • OnDisable()
      • OnEnable()
      • PauseSlotAnimation()
      • PauseSlotAnimation(const StringView& slotName, Animation* anim)
      • PlaySlotAnimation(const StringView& slotName, Animation* anim, float speed=1.0f, float blendInTime = 0.2f, float blendOutTime = 0.2f, int32 loopCount = 0)
      • PreInitSkinningData()
      • ResetAnimation()
      • Serialize(SerializeStream& stream, const void* otherObj)
      • SetBlendShapeWeight(const StringView& name, float value)
      • SetCurrentPose(const Array<Matrix>& nodesTransformation, bool worldSpace=false)
      • SetEnableTracing(bool value)
      • SetMasterPoseModel(AnimatedModel* masterPose)
      • SetNodeTransformation(const StringView& nodeName, const Matrix& nodeTransformation, bool worldSpace=false)
      • SetNodeTransformation(int32 nodeIndex, const Matrix& nodeTransformation, bool worldSpace=false)
      • SetParameterValue(const Guid& id, const Variant& value)
      • SetParameterValue(const StringView& name, const Variant& value)
      • SetupSkinningData()
      • StopSlotAnimation()
      • StopSlotAnimation(const StringView& slotName, Animation* anim)
      • UpdateAnimation()
      • UpdateBounds()
      • WaitForModelLoad()
    Back to top Copyright © 2012-2024 Wojciech Figat