CsgCylinder3D
A CSG Cylinder shape.
A CSG Cylinder shape.
This node allows you to create a cylinder (or cone) 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
CsgCylinder3DConstructor
public CsgCylinder3D();Properties6
ConeProperty
public bool Cone { get; set; }If true a cone is created, the CsgCylinder3D.Radius will only apply to one side.
HeightProperty
public float Height { get; set; }The height of the cylinder.
MaterialProperty
public Material Material { get; set; }The material used to render the cylinder.
RadiusProperty
public float Radius { get; set; }The radius of the cylinder.
SidesProperty
public int Sides { get; set; }The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder.
SmoothFacesProperty
public bool SmoothFaces { get; set; }If true the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If false the cylinder will have a flat shaded look.
Methods12
GetHeightfloat
public float GetHeight();floatGetMaterialMaterial
public Material GetMaterial();MaterialGetRadiusfloat
public float GetRadius();floatGetSidesint
public int GetSides();intGetSmoothFacesbool
public bool GetSmoothFaces();boolIsConebool
public bool IsCone();boolSetConevoid
public void SetCone(bool cone);| Name | Type | Default |
|---|---|---|
cone | bool | — |
SetHeightvoid
public void SetHeight(float height);| Name | Type | Default |
|---|---|---|
height | float | — |
SetMaterialvoid
public void SetMaterial(Material material);| Name | Type | Default |
|---|---|---|
material | Material | — |
SetRadiusvoid
public void SetRadius(float radius);| Name | Type | Default |
|---|---|---|
radius | float | — |
SetSidesvoid
public void SetSides(int sides);| Name | Type | Default |
|---|---|---|
sides | int | — |
SetSmoothFacesvoid
public void SetSmoothFaces(bool smoothFaces);| Name | Type | Default |
|---|---|---|
smoothFaces | bool | — |