When I write this:
Debug.DrawLine(firstPos.position, -firstPos.up * 5, Color.red, 1);
It doesn´t go to the actual up position from the game object. It goes to the origin´s up position.
How do I get the actual up position?
When I write this:
Debug.DrawLine(firstPos.position, -firstPos.up * 5, Color.red, 1);
It doesn´t go to the actual up position from the game object. It goes to the origin´s up position.
How do I get the actual up position?
Lines require start and end points, not points and directions:
Debug.DrawLine(firstPos.position, firstPos.position + firstPos.up * 5, Color.red, 1);
From Owen’s comment, you already have the Debug.DrawRay syntax there, so you can alternatively just replace DrawLine
with DrawRay
:
Debug.DrawRay(firstPos.position, -firstPos.up * 5, Color.red, 1);