C# Class Nez.RaycastHit

Show file Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
centroid Vector2
collider Collider
distance float
fraction float
normal Vector2
point Vector2

Public Methods

Method Description
RaycastHit ( Collider collider, float fraction, float distance, Vector2 point, Vector2 normal ) : System
ToString ( ) : string

Private Methods

Method Description
reset ( ) : void
setValues ( Collider collider, float fraction, float distance, Vector2 point ) : void
setValues ( float fraction, float distance, Vector2 point, Vector2 normal ) : void

Method Details

RaycastHit() public method

public RaycastHit ( Collider collider, float fraction, float distance, Vector2 point, Vector2 normal ) : System
collider Collider
fraction float
distance float
point Vector2
normal Vector2
return System

ToString() public method

public ToString ( ) : string
return string

Property Details

centroid public property

The centroid of the primitive used to perform the cast. Where the shape would be positioned for it to contact.
public Vector2 centroid
return Vector2

collider public property

The collider hit by the ray
public Collider,Nez collider
return Collider

distance public property

The distance from the ray origin to the impact point
public float distance
return float

fraction public property

Fraction of the distance along the ray that the hit occurred.
public float fraction
return float

normal public property

The normal vector of the surface hit by the ray
public Vector2 normal
return Vector2

point public property

The point in world space where the ray hit the collider's surface
public Vector2 point
return Vector2