Method IsHit
IsHit(ICamera, RideVector3, ISpatialObject, Single)
Tests if you hit testObject with the ray cast.
Declaration
public static bool IsHit(ICamera rayCastCam, RideVector3 screenPos, ISpatialObject testObject, float spreadFactor = 0F)
Parameters
Type | Name | Description |
---|---|---|
ICamera | rayCastCam | The camera to do the ray casting from |
RideVector3 | screenPos | The screen position that creates the origin and direction of the ray |
ISpatialObject | testObject | The object to test the ray against |
System.Single | spreadFactor | the amount to modify the the axis of direction |
Returns
Type | Description |
---|---|
System.Boolean | True if the ray hit the test object |
IsHit(ICamera, RideVector3, RideLayerMask, Single)
Tests if you hit something with the ray cast.
Declaration
public static bool IsHit(ICamera rayCastCam, RideVector3 screenPos, RideLayerMask mask, float spreadFactor = 0F)
Parameters
Type | Name | Description |
---|---|---|
ICamera | rayCastCam | The camera to do the ray casting from |
RideVector3 | screenPos | The screen position that creates the origin and direction of the ray |
RideLayerMask | mask | Layer mask |
System.Single | spreadFactor | the amount to modify the the axis of direction |
Returns
Type | Description |
---|---|
System.Boolean | True if the ray hit something |
IsHit(RideVector3, RideVector3, RideLayerMask, Single)
Tests if you hit something with the ray cast.
Declaration
public static bool IsHit(RideVector3 origin, RideVector3 direction, RideLayerMask mask, float spreadFactor = 0F)
Parameters
Type | Name | Description |
---|---|---|
RideVector3 | origin | origin of the ray |
RideVector3 | direction | direction of the ray |
RideLayerMask | mask | layer mask |
System.Single | spreadFactor | the amount to modify the the axis of direction |
Returns
Type | Description |
---|---|
System.Boolean | True if the ray hit something |