Method AddSphere
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
AddSphere(Sphere, ShapeDefinition?)
Attaches a sphere to this body.
public Shape AddSphere(Sphere sphere, ShapeDefinition? definition = null)Parameters
sphereSphere-
The sphere, in body-local space.
definitionShapeDefinition?-
The shape settings, or null for the defaults.
Returns
- Shape
-
The new shape.
Examples
body.AddSphere(new Sphere(0.5f));
body.AddSphere(new Sphere(0.5f), ShapeDefinition.Default with { Density = 2000.0f });