Jump to content

DrawLine Function in 3D Space


DudeAwesome
 Share

Recommended Posts

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.

  • Upvote 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...