Reputation: 3715
As you can see from this simple code I'm casting 3 rays and red ray should be similar to magenta line it must go from startPos to endPos. But for some reason red ray is copying yellow line.
Can't understand what is wrong...
Vector2 startPos = transform.position;
Vector2 endPos = transform.position + transform.up * 3f;
Debug.DrawRay(Vector3.zero, startPos, Color.green);
Debug.DrawRay(Vector3.zero, endPos, Color.yellow);
Debug.DrawLine(startPos, endPos, Color.magenta);
Debug.DrawRay(startPos, endPos, Color.red);
Upvotes: 1
Views: 128