Api Sandbox PhysicsBodyBuilder
class

PhysicsBodyBuilder

public sealed class PhysicsBodyBuilder

Provides ability to generate a physics body for a Model at runtime. See String)

Properties

Name Type Description
Mass Single The mass of the body in kilograms. Set to 0 to calculate automatically from its shapes and density.
Surface Surface The surface properties applied to this body.
BindPose Transform The bind pose transform used when attaching this body to a bone.
BoneName String The name of the bone this body is attached to, or null if not attached.

Methods

PhysicsBodyBuilder SetMass(Single mass)
PhysicsBodyBuilder SetSurface(Surface surface)
PhysicsBodyBuilder SetBindPose(Transform bindPose)
PhysicsBodyBuilder SetBoneName(String boneName)
PhysicsBodyBuilder AddSphere(Sphere sphere, Transform? transform = null)
PhysicsBodyBuilder AddCapsule(Capsule capsule, Transform? transform = null)
PhysicsBodyBuilder AddHull(Span<Vector3> points, Transform? transform = null, HullSimplify? simplify = null)
PhysicsBodyBuilder AddMesh(Span<Vector3> vertices, Span<UInt32> indices, Span<Byte> materials)
Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.PhysicsBodyBuilder