How to point a Ray in the right direction?

I’m having issues with my raycasts not returning the expected result. I’ve added a Debug.DrawLine, and sure enough, my line isn’t going forward, but is always pointing down/right, as you can see in the screen shot. (Screenshot: The capsule is the player, facing towards the green box, but the red-line, the ray, is going down right.)

I’ve tried manually entering the vector3 numbers, changing them dramatically, but the line always points the same direction.

Debug.DrawLine(transform.position, Vector3.forward,, 5);

What am I doing wrong? Thanks!!


DrawLine expects two points, not a point and a direction.