CsgSphere3D
A CSG Sphere shape.
A CSG Sphere shape.
This node allows you to create a sphere for use with the CSG system.
Note: CSG nodes are intended to be used for level prototyping. Creating CSG nodes has a significant CPU cost compared to creating a MeshInstance3D with a PrimitiveMesh. Moving a CSG node within another CSG node also has a significant CPU cost, so it should be avoided during gameplay.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CsgSphere3DConstructor
public CsgSphere3D();Properties5
MaterialProperty
public Material Material { get; set; }The material used to render the sphere.
RadialSegmentsProperty
public int RadialSegments { get; set; }Number of vertical slices for the sphere.
RadiusProperty
public float Radius { get; set; }Radius of the sphere.
RingsProperty
public int Rings { get; set; }Number of horizontal slices for the sphere.
SmoothFacesProperty
public bool SmoothFaces { get; set; }If true the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If false the sphere will have a flat shaded look.
Methods10
GetMaterialMaterial
public Material GetMaterial();MaterialGetRadialSegmentsint
public int GetRadialSegments();intGetRadiusfloat
public float GetRadius();floatGetRingsint
public int GetRings();intGetSmoothFacesbool
public bool GetSmoothFaces();boolSetMaterialvoid
public void SetMaterial(Material material);| Name | Type | Default |
|---|---|---|
material | Material | — |
SetRadialSegmentsvoid
public void SetRadialSegments(int radialSegments);| Name | Type | Default |
|---|---|---|
radialSegments | int | — |
SetRadiusvoid
public void SetRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetRingsvoid
public void SetRings(int rings);| Name | Type | Default |
|---|---|---|
rings | int | — |
SetSmoothFacesvoid
public void SetSmoothFaces(bool smoothFaces);| Name | Type | Default |
|---|---|---|
smoothFaces | bool | — |