Model
Namespace: SharpPluginLoader.Core.Models
Represents an instance of a uMhModel class
public class Model : SharpPluginLoader.Core.MtObject
Inheritance Object → NativeWrapper → MtObject → Model
Properties
Position
The position of the model
public MtVector3& Position { get; }
Property Value
Size
The size of the model
public MtVector3& Size { get; }
Property Value
CollisionPosition
The position of the model's collision box
public MtVector3& CollisionPosition { get; }
Property Value
Rotation
The rotation of the model
public MtQuaternion& Rotation { get; }
Property Value
Forward
The model's forward vector
public MtVector3 Forward { get; }
Property Value
AnimationFrame
The current frame of the model's current animation
public float AnimationFrame { get; set; }
Property Value
MaxAnimationFrame
The frame count of the model's current animation
public float MaxAnimationFrame { get; set; }
Property Value
AnimationSpeed
The speed of the model's current animation. Note, this value gets set every frame.
public float AnimationSpeed { get; set; }
Property Value
CurrentAnimation
Gets the current animation of the model
public AnimationId& CurrentAnimation { get; }
Property Value
AnimationLayer
The model's animation component
public AnimationLayerComponent AnimationLayer { get; }
Property Value
MotionLists
The model's motion lists.
public IEnumerable<MotionList> MotionLists { get; }
Property Value
Instance
The native pointer.
public nint Instance { get; set; }
Property Value
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()