API ReferenceSandbox
public sealed class Sandbox.PhysicsBodyBuilder
Provides ability to generate a physics body for a `Sandbox.Model` at runtime. See `Sandbox.ModelBuilder.AddBody(System.Single,Sandbox.Surface,System.String)`
Methods
Showing 8 methods
public Sandbox.PhysicsBodyBuilder AddCapsule(Capsule capsule, System.Nullable`1<Transform> transform = null)
Parameters
transform: Default: null
public Sandbox.PhysicsBodyBuilder AddHull(System.Span`1<Vector3> points, System.Nullable`1<Transform> transform = null, System.Nullable`1<Sandbox.PhysicsBodyBuilder.HullSimplify> simplify = null)
Parameters
transform: Default: nullsimplify: Default: null
public Sandbox.PhysicsBodyBuilder AddMesh(System.Span`1<Vector3> vertices, System.Span`1<uint> indices, System.Span`1<byte> materials)
public Sandbox.PhysicsBodyBuilder AddSphere(Sandbox.Sphere sphere, System.Nullable`1<Transform> transform = null)
Parameters
transform: Default: null
public Sandbox.PhysicsBodyBuilder SetBindPose(Transform bindPose)
public Sandbox.PhysicsBodyBuilder SetBoneName(string boneName)
public Sandbox.PhysicsBodyBuilder SetMass(float mass)
public Sandbox.PhysicsBodyBuilder SetSurface(Sandbox.Surface surface)
No results match this filter.
Properties
Showing 4 properties
public Transform Sandbox.PhysicsBodyBuilder.BindPose { get; set; }
The bind pose transform used when attaching this body to a bone.
public string Sandbox.PhysicsBodyBuilder.BoneName { get; set; }
The name of the bone this body is attached to, or `null` if not attached.
public float Sandbox.PhysicsBodyBuilder.Mass { get; set; }
The mass of the body in kilograms. Set to `0` to calculate automatically from its shapes and density.
public Sandbox.Surface Sandbox.PhysicsBodyBuilder.Surface { get; set; }
The surface properties applied to this body.
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.PhysicsBodyBuilder |