Page 1 of 1

Debug.DrawRay?

Posted: Tue Sep 11, 2018 4:29 am
by MeteoricDragon
I've tried using Debug.DrawRay in game, and it never seems to work. Is there a setting that disables it in Unity or some graphical setting in DFU?

Re: Debug.DrawRay?

Posted: Tue Sep 11, 2018 4:55 am
by Interkarma
Nothing should be stopping this from working in DFU. All I can think of is make sure you're in scene view and have gizmos enabled.

If that doesn't fix it, I'm not sure what problem is. Will take a look when I can if you're still stuck later. :)

Vector math

Posted: Wed Sep 12, 2018 6:32 pm
by MeteoricDragon
Thanks, I'm going to really need Debug.DrawRay to do some debugging when I implement and test my solutions for wrapping around outside and inside corners while climbing. I'll be working with the normal of the wall the player is on, the normal of the adjacent wall, the line produced where the planes of the two normals intersect, the closest point on that line to the player, (if it's an outside corner), if it's an inside corner I'll need the point on plane that is closest to where the player is facing, and the point that is closest to player on adjacent wall.

If player going around outside corner, he'll revolve around the point on the line of intersection between two planes. If inside corner, he'll rotate from the closest point on the current wall to closest point on the adjacent wall.