- Home /
Line drawing
Using a click 2 move script I've found troubles when hitting a wall, it's strange and I simply want it to stop right before touching the wall. I know that using the Debug.LineDraw will make a line and goes through the wall, is there a way to use that or anything like it to detect if the player is close enough and also looking at the wall. I want it to stop when it's facing the wall(and close enough), but move around when not facing the wall. Thanks for any help you can give! :D
yes, it's raycasting ...
http://docs.unity3d.com/Documentation/ScriptReference/Physics.Raycast.html
there are many, many google references to great tutorials on raycasting in Unity
Your answer
Follow this Question
Related Questions
create line on a texture 2 Answers
Draw a line via script and make a solid with it.. 1 Answer
How to draw a line between two points in Unity 2 Answers
Draw path along Navmesh agent path 3 Answers
Draw shape with mousedown 1 Answer