Class CapsuleModCollider
ModCollider for CapsuleColliders.
Note: Debug visuals for CapsuleColliders are displayed as boxes.
Implements
Inherited Members
Namespace: Modding.Serialization
Assembly: Assembly-CSharp.dll
Syntax
public class CapsuleModCollider : ModCollider, IValidatable
Constructors
CapsuleModCollider()
Declaration
public CapsuleModCollider()
Fields
Capsule
Definition of the capsule properties, used for deserialization.
Declaration
[RequireToValidate]
public CapsuleModCollider.CapsuleWrapper Capsule
Field Value
Type | Description |
---|---|
CapsuleModCollider.CapsuleWrapper |
Properties
Dir
Along which axis the capsule points.
Declaration
public Direction Dir { get; }
Property Value
Type | Description |
---|---|
Direction |
Height
Height of the collider. (Parallel to the direction)
Declaration
public float Height { get; }
Property Value
Type | Description |
---|---|
Single |
Radius
Radius of the collider. (Perpendicular to the direction)
Declaration
public float Radius { get; }
Property Value
Type | Description |
---|---|
Single |
Rotation
Rotation of the collider.
Declaration
public Vector3 Rotation { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Methods
CreateCollider(Transform)
Creates a game object with a collider attached, set up according to the ModCollider instance.
Declaration
public override Collider CreateCollider(Transform parent)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | parent | Transform the new object should be a child of. |
Returns
Type | Description |
---|---|
UnityEngine.Collider | The new Collider component. |
Overrides
CreateVisual(Transform)
Creates a debug visual object to represent this collider.
Declaration
public override Transform CreateVisual(Transform overallParent)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | overallParent |
Returns
Type | Description |
---|---|
UnityEngine.Transform | The Transform of the new object. |