Jump to content

Recommended Posts

Posted

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() ?

It doesn´t work... why? mhmmm It works... why?

Posted

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

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.

×
×
  • Create New...