API Reference / Sandbox / ModelBuilder ModelBuilderclass Provides the ability to generate `Sandbox.Model`s at runtime.
A new instance is available from `Sandbox.Model.Builder`.
object → ModelBuilder
Namespace Sandbox Assembly Sandbox.Engine Declaration public sealed class Sandbox . ModelBuilder No results match this filter.
Parameter Type Description name string The name of the animation. frameRate float The frames per second of the animation.
Parameter Type Description name string The attachment name. position Vector3 The position relative to the parent bone. rotation Rotation The rotation relative to the parent bone. parentName = null string The parent bone name, or null for a model-space attachment.
public Sandbox . BallJointBuilder AddBallJoint ( int body1 , int body2 , System . Nullable ` 1 < Transform > frame1 = null , System . Nullable ` 1 < Transform > frame2 = null , bool collision = False ) PUBLIC Parameter Type Description body1 int — body2 int — frame1 = null Nullable <Transform >— frame2 = null Nullable <Transform >— collision = False bool —
Parameter Type Description mass = 0 float The mass in kilograms. A value of 0 calculates mass from the body's shapes and surface density. surface = null Surface The surface properties applied to the body. boneName = null string Optional name of the bone this body is attached to.
Leave empty for non-skeletal bodies.
Parameter Type Description bones Bone []The bones to add.
Parameter Type Description center0 Vector3 The center of the first rounded end. center1 Vector3 The center of the second rounded end. radius float The capsule radius.
Parameter Type Description radius float The sphere radius. center = null Vector3 The sphere center.
public Sandbox . FixedJointBuilder AddFixedJoint ( int body1 , int body2 , System . Nullable ` 1 < Transform > frame1 = null , System . Nullable ` 1 < Transform > frame2 = null , bool collision = False ) PUBLIC Parameter Type Description body1 int — body2 int — frame1 = null Nullable <Transform >— frame2 = null Nullable <Transform >— collision = False bool —
public Sandbox . HingeJointBuilder AddHingeJoint ( int body1 , int body2 , System . Nullable ` 1 < Transform > frame1 = null , System . Nullable ` 1 < Transform > frame2 = null , bool collision = False ) PUBLIC Parameter Type Description body1 int — body2 int — frame1 = null Nullable <Transform >— frame2 = null Nullable <Transform >— collision = False bool —
public Sandbox . HitboxSetBuilder AddHitboxSet ( string name = default ) PUBLIC Adds a named hitbox set.
Parameter Type Description name = default string The hitbox set name.
Parameter Type Description name string The material group name.
public Sandbox . SliderJointBuilder AddSliderJoint ( int body1 , int body2 , System . Nullable ` 1 < Transform > frame1 = null , System . Nullable ` 1 < Transform > frame2 = null , bool collision = False ) PUBLIC Parameter Type Description body1 int — body2 int — frame1 = null Nullable <Transform >— frame2 = null Nullable <Transform >— collision = False bool —
Parameter Type Description surface Surface The surface to add. Null uses the default surface.
public Sandbox . Model Create ( ) PUBLIC Builds the model.
Returns: Model The finished model.
Parameter Type Description position Vector3 The eye position.
Parameter Type Description bounds BBox The model-space hull bounds.
Parameter Type Description lod int The LOD level, from 0 to 7. distance float The switch distance.
Exceptions Exception Condition ArgumentOutOfRangeException The LOD level is outside the range 0 to 7.
public Sandbox . ModelBuilder WithMass ( float mass ) PUBLIC Sets the mass, in kilograms, used by collision shapes added directly to this builder.
The default is 1000.
Parameter Type Description mass float The total mass of the collision body.
Parameter Type Description degrees float The maximum eye deflection angle.
Parameter Type Description name string The model name.
Parameter Type Description name string The surface name.
Parameter Type Description bounds BBox The model-space visibility bounds.
No results match this filter.