Struct CollisionController
Controls the values passed into physics.2D calls to allow for custom collision detection systems.
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public struct CollisionController
Constructors
CollisionController(Single, Single, Int16, Int16, Single)
Declaration
public CollisionController(float horiztonalRayDistance = 0.01F, float verticalRayDistance = 0.01F, short horiztonalRayAmount = 3, short verticalRayAmount = 3, float horiztonalOffset = 0.01F)
Parameters
| Type |
Name |
Description |
| System.Single |
horiztonalRayDistance |
|
| System.Single |
verticalRayDistance |
|
| System.Int16 |
horiztonalRayAmount |
|
| System.Int16 |
verticalRayAmount |
|
| System.Single |
horiztonalOffset |
|
Fields
HoriztonalRayAmount
Declaration
public int HoriztonalRayAmount
Field Value
| Type |
Description |
| System.Int32 |
|
HoriztonalRayDistance
Declaration
public float HoriztonalRayDistance
Field Value
| Type |
Description |
| System.Single |
|
RaycastHit2Ds
Declaration
public RaycastHit2D[] RaycastHit2Ds
Field Value
| Type |
Description |
| RaycastHit2D[] |
|
VerticalRayAmount
Declaration
public int VerticalRayAmount
Field Value
| Type |
Description |
| System.Int32 |
|
VerticalRayDistance
Declaration
public float VerticalRayDistance
Field Value
| Type |
Description |
| System.Single |
|
Properties
RayOffset
Declaration
public float RayOffset { readonly get; }
Property Value
| Type |
Description |
| System.Single |
|
Methods
DidHitObjectInLayerMask(LayerMask)
NOT IMPLEMENTED YET.
Check the AICrushAction for the bitwise operator method I would like to implement here.
Checks if anything in the collision controllers RayCastHit2D array matches the layer mask.
This allows reusing the already cached raycast hits for better performance.
Declaration
public bool DidHitObjectInLayerMask(LayerMask layerMask)
Parameters
| Type |
Name |
Description |
| LayerMask |
layerMask |
|
Returns
| Type |
Description |
| System.Boolean |
|