Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by pisio · Oct 28, 2012 at 08:29 PM · mousecubedraw

Draw line on cube ?

How I can draw on cube with mouse ?

To get mouse possition, but it get all points to draw 1 line. How i can draw same lines in 1 cube with size ( 100, 100 , 1 ) ?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Phoskryfes · Oct 29, 2012 at 01:47 PM 1
Share

Please make your question more clear. I really don't understand it.

avatar image pisio · Oct 29, 2012 at 05:06 PM 0
Share

How I can draw line on cube with size x=100, y= 100 , z = 1 With mouse ?

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by AlucardJay · Oct 31, 2012 at 06:42 AM

You could do this the same way as you leave a bullet hole texture.

Raycast from the mouse position, get the hit information where that ray hits the cube. Find the normal of that hit, and instantiate a plane with the texture of an ink dot at the hit position and rotated to the normal. Of course once you do this too many times, the draw calls and number of objects will slow everything down. As in the comments, you need to be more clear : what are you trying to do exactly? just paint a cube?

The closest I can think of to what you need is the above, or : http://answers.unity3d.com/questions/285040/draw-a-line-in-game.html

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Phoskryfes · Oct 30, 2012 at 12:28 AM

Due to my intellect, it is not possible to draw a line to the cube. But it is possible for you to put a material so it could have the picture. In the picture you must draw the line. Paint is good then just save it. Click the cube, go to mesh renderer(still in the cube), go to materials (Inside mesh renderer), then on the element, pick the picture of your desired picture. Your picture must be inside the Assests folder. Make your picture into a material first then add it in the element in the mesh renderer.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Phoskryfes · Oct 30, 2012 at 01:49 AM 0
Share

Could you accept my answer by pressing the check button at the left side of my answer?

avatar image Hybris · Oct 30, 2012 at 03:45 PM 0
Share

jod, if you don't know if he is searching for that answer, don't ask to accept it.

avatar image Phoskryfes · Oct 31, 2012 at 06:10 AM 0
Share

oh ok I am just questioning him if yes or no. If he doesn't like, that's ok.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How To Drag any Cube Using Mouse Click and Moved Only 1 Unit?? 2 Answers

how to skethup lines at runtime with mouse position 1 Answer

Using Gizmos.DrawWireCube to draw position bounds? 1 Answer

How to check if your cursor is over a cube. 1 Answer

Cube Highlighter 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges