DudeAwesome Posted January 26, 2014 Share Posted January 26, 2014 Hey guys I will draw a line to see my Pick() rays. I only find the command to draw a line in the window but I will draw a line in 3d space and cant find the function in the api someone can tell me the functionname() ? Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
Rick Posted January 26, 2014 Share Posted January 26, 2014 If you want a 2D line to look like it's in 3D spce (but it's still 2D) then you can use DrawLine() along with the Project()/UnProject() functions (check camera or world in docs) to translate a 3D point to 2D point and back. A 3D line really doesn't exist though. At that point you are using a 3D model to represent a line and scaling it to get the length. If you want to do that you can make a csg cylinder, attach a script to it, save as prefab, and use that. 1 Quote Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 26, 2014 Author Share Posted January 26, 2014 ah ok. didnt saw that. just was looking for something like drawLine in world/camera/context with x,y,z coords thx rick Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.