Class RaycastHelper
Basic implementation of IRaycastHelper
Implements
Namespace: nickmaltbie.OpenKCC.Utils
Assembly: cs.temp.dll.dll
Syntax
public class RaycastHelper : IRaycastHelper
Fields
Instance
Universal instance of RaycastHelper.
Declaration
public static RaycastHelper Instance
Field Value
Type | Description |
---|---|
RaycastHelper |
Methods
DoRaycastInDirection(Vector3, Vector3, Single, out IRaycastHit, Int32, QueryTriggerInteraction)
Do a raycast in a given direction ignoring this object.
Declaration
public bool DoRaycastInDirection(Vector3 source, Vector3 direction, float distance, out IRaycastHit stepHit, int layerMask = -1, QueryTriggerInteraction queryTriggerInteraction = null)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | source | Source point to check from. |
Vector3 | direction | Direction to search for step. |
Single | distance | Distance to search for step ahead of player. |
IRaycastHit | stepHit | Information about step hit ahead. |
Int32 | layerMask | Layer mask for checking which objects to collide with. |
QueryTriggerInteraction | queryTriggerInteraction | Configuration for QueryTriggerInteraction when solving for collisions. |
Returns
Type | Description |
---|---|
Boolean | Is something ahead hit. |