Click or drag to resize

MeshesCreateCylinder Method

Creates a cylinder.

Namespace:  KSPDev.ModelUtils
Assembly:  KSPDev_Utils.2.5 (in KSPDev_Utils.2.5.dll) Version: 2.5 for KSP v1
Syntax
C#
public static GameObject CreateCylinder(
	float diameter,
	float length,
	Material material,
	Transform parent,
	CollidersPrimitiveCollider colliderType = CollidersPrimitiveCollider.None
)
Request Example View Source

Parameters

diameter
Type: SystemSingle
XY of the cylinder.
length
Type: SystemSingle
Z-axis of the cylinder.
material
Type: UnityEngineMaterial
Material for the primitive.
parent
Type: UnityEngineTransform
Parent transform to attach primitive to.
colliderType (Optional)
Type: KSPDev.ModelUtilsCollidersPrimitiveCollider
Type of the collider to create on the primitive.

Return Value

Type: GameObject
Cylinder game object.
See Also