S&box Wiki

Sandbox.ModelEntity

Sandbox.ModelEntity

Properties

int BoneCount { get; }
BBox CollisionBounds { get; set; }
bool EnableAllCollisions { set; }
Enable or disable all physics/solid collisions as well as trace collisions.
bool EnableHitboxes { get; set; }
Use Hitboxes for traces etc
bool EnableSelfCollisions { set; }
Allow ragdoll parts to collide with each other
bool EnableSolidCollisions { set; }
bool EnableTouch { set; }
Allow Touch callbacks to be called
bool EnableTouchPersists { set; }
Allow Touch callbacks to be called
bool EnableTraceAndQueries { set; }
bool GlowActive { get; set; }
Gets or set if the glow is active on the object.
Color GlowColor { get; set; }
Get and set the color of the glow override on this object.
int GlowDistanceEnd { get; set; }
The maximum distance that this object will glow.
int GlowDistanceStart { get; set; }
The minimum distance that this object will start glowing.
Sandbox.GlowStates GlowState { get; set; }
Get and set the behaviour of the glow. Note that you still need to use GlowActive to enable it.
string HitboxSet { get; set; }
Vector3 LocalPosition { get; set; }
Rotation LocalRotation { get; set; }
int MaterialGroupCount { get; }
Set material group to replace materials of the model Uses index for material group
BBox OOBBox { get; }
bool PhysicsEnabled { get; set; }
Enable or disable physics motion
Vector3 Position { get; set; }
float RenderAlpha { get; set; }
Color32 RenderColor { get; set; }
Rotation Rotation { get; set; }
string SceneLayer { get; set; }
Sandbox.SurroundingBoundsType SurroundingBoundsMode { get; set; }
Set the method used to work out the surrounding bounds. The bounds are important for traces and collision checks, because they're used the quickly eliminate collisions.
bool UsePhysicsCollision { set; }
Vector3 Velocity { get; set; }

Methods

Transform[] ComputeBones( float timeOffset )
void CopyBodyGroups( Sandbox.ModelEntity from )
Copy body groups over to this model
void CopyMaterialGroup( Sandbox.ModelEntity from )
Copy material group over to this model
Transform? GetAttachment( string name, bool worldspace = True )
int GetBone( Sandbox.PhysicsBody body )
Get the bone that this physics body is attached to
int GetBoneIndex( string boneName )
string GetBoneName( int i )
int GetBoneParent( string boneName )
Sandbox.PhysicsBody GetBonePhysicsBody( int iBone )
Get the physics body attached to this bone
Transform GetBoneTransform( string boneName, bool worldspace = True )
int GetHitboxBone( int hitbox )
Return which bone is this hitbox attached to
int GetHitboxGroup( int hitbox )
Return group id for this hitbox
string GetModelName()
void MoveBlocked( Sandbox.Entity entity )
Called when your move is blocked
void MoveFinished()
Called when your move is finished
void MoveTo( Angles rotation, float seconds )
Angles. Blah.
void OnAnimEventFootstep( Vector3 position, int foot, float volume )
void OnAnimEventGeneric( string name, int intData, float floatData, Vector3 vectorData, string stringData )
void OnCarryDrop( Sandbox.Entity carrier )
Allow the entity to do what it wants when it's removed from the inventory
void OnCarryStart( Sandbox.Entity carrier )
Allow the entity to do what it wants when it's added to the inventory. Default behaviour is to add the target entity as a parent and stop moving.
void OnNewModel( Sandbox.Model model )
Called when the model is changed.
void PhysicsClear()
Destroy any physics objects
void ResetBone( string name )
void ResetBones()
void SetBodyGroup( string group, int value )
Set body group to replace parts of the model Uses name for bodygroup
void SetBone( string name, Transform tx )
bool SetBoneTransform( string boneName, Transform tx, bool worldspace = True )
void SetInteractsAs( Sandbox.CollisionLayer layer )
Which interaction layers do I represent?
void SetInteractsExclude( Sandbox.CollisionLayer layer )
Which interaction layers do I represent?
void SetInteractsWith( Sandbox.CollisionLayer layer )
Which interaction layers do I interact or collide with?
void SetMaterialGroup( int group )
Set material group to replace materials of the model Uses index for material group
void SetModel( Sandbox.Model model )
void TakeDecalsFrom( Sandbox.ModelEntity source )
Move all of the decals from this entity onto ourself

Special Pages


Wikis

?

Render Time: 15ms

DB GetPage 3
Generate Html 1
SaveChanges (1) 6
Render Body 0
Render Sidebar 2