Vector2 | origin |
Vector2 | direction |
// Create a ray from the transform position along the transform's z-axis
var ray2 = new Ray2 (transform.position, transform.forward);
// Create a ray from the transform position along the transform's z-axis Ray2 ray = new Ray2(transform.position, transform.forward);