Debug.DrawRay?

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Debug.DrawRay?

Post 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?

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Debug.DrawRay?

Post 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. :)

User avatar
MeteoricDragon
Posts: 141
Joined: Mon Feb 12, 2018 8:23 pm

Vector math

Post 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.

Post Reply