ModelPhysicsclass

Physics for a model. This is primarily used for ragdolls and other physics driven models, otherwise you should be using a Rigidbody.

objectComponentModelPhysics
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.ModelPhysics : Sandbox.Component

Constructors1

Showing 1 constructors

Methods1

Showing 1 methods

public void CopyBonesFrom(Sandbox.SkinnedModelRenderer source, bool teleport)PUBLIC

Copy the bone positions and velocities from a different SkinnedModelRenderer

ParameterTypeDescription
sourceSkinnedModelRenderer
teleportbool
Returns:void

Properties13

Showing 13 properties

public System.Collections.Generic.List`1<Sandbox.ModelPhysics.Body> Sandbox.ModelPhysics.Bodies { get; set; }PUBLICGETSET

Networked list of bodies.

Returns:List<Body>

public bool Sandbox.ModelPhysics.IgnoreRoot { get; set; }PUBLICGETSET

If true, the root physics body will not drive this component's transform.

Returns:bool

public float Sandbox.ModelPhysics.Mass { get; set; }PUBLICGETSET

Returns the total mass of every `Sandbox.Rigidbody`

Returns:float

public Vector3 Sandbox.ModelPhysics.MassCenter { get; set; }PUBLICGETSET

Returns the center of mass of every `Sandbox.Rigidbody` in world-space

Returns:Vector3

public virtual sealed Sandbox.Model Sandbox.ModelPhysics.Model { get; set; }PUBLICVIRTUALGETSET

The model used to generate physics bodies, collision shapes, and joints.

Returns:Model

public bool Sandbox.ModelPhysics.MotionEnabled { get; set; }PUBLICGETSET

Enable to drive renderer from physics, disable to drive physics from renderer.

Returns:bool

public bool Sandbox.ModelPhysics.PhysicsWereCreated { get; set; }PUBLICGETSET

Returns:bool

public bool Sandbox.ModelPhysics.StartAsleep { get; set; }PUBLICGETSET

All bodies will be put to sleep on start.

Returns:bool

On this page