Model

Namespace: SharpPluginLoader.Core.Models

Represents an instance of a uMhModel class

public class Model : SharpPluginLoader.Core.MtObject

Inheritance ObjectNativeWrapperMtObjectModel

Properties

Position

The position of the model

public MtVector3& Position { get; }

Property Value

MtVector3&

Size

The size of the model

public MtVector3& Size { get; }

Property Value

MtVector3&

CollisionPosition

The position of the model's collision box

public MtVector3& CollisionPosition { get; }

Property Value

MtVector3&

Rotation

The rotation of the model

public MtQuaternion& Rotation { get; }

Property Value

MtQuaternion&

Forward

The model's forward vector

public MtVector3 Forward { get; }

Property Value

MtVector3

AnimationFrame

The current frame of the model's current animation

public float AnimationFrame { get; set; }

Property Value

Single

MaxAnimationFrame

The frame count of the model's current animation

public float MaxAnimationFrame { get; set; }

Property Value

Single

AnimationSpeed

The speed of the model's current animation. Note, this value gets set every frame.

public float AnimationSpeed { get; set; }

Property Value

Single

CurrentAnimation

Gets the current animation of the model

public AnimationId& CurrentAnimation { get; }

Property Value

AnimationId&

AnimationLayer

The model's animation component

public AnimationLayerComponent AnimationLayer { get; }

Property Value

AnimationLayerComponent

MotionLists

The model's motion lists.

public IEnumerable<MotionList> MotionLists { get; }

Property Value

IEnumerable<MotionList>

Instance

The native pointer.

public nint Instance { get; set; }

Property Value

IntPtr

Constructors

Model(IntPtr)

public Model(nint instance)

Parameters

instance IntPtr

Model()

public Model()

Methods

Teleport(MtVector3)

Teleports the model to the given position

public void Teleport(MtVector3 position)

Parameters

position MtVector3
The target position

Remarks:

Use this function if you need to move a model and ignore walls.

Resize(Single)

Resizes the model on all axes to the given size

public void Resize(float size)

Parameters

size Single
The new size of the model

PauseAnimations()

Pauses the model's current animation

public void PauseAnimations()

ResumeAnimations()

Resumes the model's current animation

public void ResumeAnimations()