Click or drag to resize

CollidersSetCollisionIgnores Method (Transform, Transform, Boolean)

Disables/enables all the colliders between the objects.

Namespace:  KSPDev.ModelUtils
Assembly:  KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
Syntax
C#
public static void SetCollisionIgnores(
	Transform obj1,
	Transform obj2,
	bool ignore
)
Request Example View Source

Parameters

obj1
Type: UnityEngineTransform
Source object.
obj2
Type: UnityEngineTransform
Target object.
ignore
Type: SystemBoolean
If true then the collisions between the objects will be ignored. Otherwise, the collisions will be handled.
Remarks
All colliders in all the children of the both objects are explicitly set to not collide with each other. The ignore state is reset to false on every scene load.
See Also