CollidersAdjustCollider Method |
Adds or adjusts a primitive collider on the mesh.
Namespace:
KSPDev.ModelUtils
Assembly:
KSPDev_Utils.1.0 (in KSPDev_Utils.1.0.dll) Version: 1.0 for KSP v1.6+
Syntaxpublic static void AdjustCollider(
GameObject primitive,
Vector3 meshSize,
CollidersPrimitiveCollider colliderType,
Nullable<PrimitiveType> shapeType = null
)
Request Example
View SourceParameters
- primitive
- Type: UnityEngineGameObject
The primitive game object to adjust. - meshSize
- Type: UnityEngineVector3
The size of the collider in local units. Depending on shapeType the meaning
of the components is different. If the shape has a "round" component, then it's a "diameter"
in this vector.
- colliderType
- Type: KSPDev.ModelUtilsCollidersPrimitiveCollider
Determines how a collider type should be selected. - shapeType (Optional)
- Type: SystemNullablePrimitiveType
The type of the primitive when colliderType is
Shape. It will determine the type of the collider. Only
Cylinder, Sphere, and
Cube are supported.
Remarks
Type of the primitive collider is chosen basing on the primitive type.
See Also