Click or drag to resize

MeshesCreateSphere Method

Creates an ideal sphere.

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 CreateSphere(
	float diameter,
	Material material,
	Transform parent,
	CollidersPrimitiveCollider colliderType = CollidersPrimitiveCollider.None
)
Request Example View Source

Parameters

diameter
Type: SystemSingle
Diameter of the sphere.
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
Sphere game object.
See Also