unity3d-runtime-debug-draw
unity3d-runtime-debug-draw copied to clipboard
Text bugs out when it is behind camera
This has to do with the fact that there isn't a check if the text is in front or behind the camera. This results in strange issues.
The fix simply involves checking if the world position of the text object is in front of the camera when running GUIDrawTextEntry or GUIAttachTextEntry:
` Vector3 worldPos = entry.anchor;
Vector3 heading = worldPos - camera.transform.position;
if (Vector3.Dot(camera.transform.forward, heading) <= 0)
return;
`
Added a pull request that should fix this issue: #8