PhysicsBodyBuilderclass

Builds a physics body for a `Sandbox.Model`.

objectPhysicsBodyBuilder
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.PhysicsBodyBuilder

Methods9

Showing 9 methods

public Sandbox.PhysicsBodyBuilder AddMesh(System.Span`1<Vector3> vertices, System.Span`1<uint> indices, System.Span`1<byte> materials)PUBLIC

ParameterTypeDescription
verticesSpan<Vector3>
indicesSpan<uint>
materialsSpan<byte>

public Sandbox.PhysicsBodyBuilder SetBoneName(string boneName)PUBLIC

ParameterTypeDescription
boneNamestringThe attached bone name, or null to detach it.

Properties4

Showing 4 properties

public string Sandbox.PhysicsBodyBuilder.BoneName { get; set; }PUBLICGETSET

The name of the bone this body is attached to, or `null` if not attached.

Returns:string

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

The mass of the body in kilograms. Set to `0` to calculate automatically from its shapes and density.

Returns:float

On this page