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 /
avatar image
0
Question by Matthew Dennis · Apr 14, 2011 at 12:56 PM · collision3dtextappear

How to get a 3D Text to appear on collision of another object?

Hello,

I understand how to get text to appear on collision from another object, but how to get 3D Text to appear?

The example to help with that very slim question ive put there;

(This is how to make text on gui appear) If object A(a circle) collides with a box collider, a script is activated(a script that is on the box collider) which will read "on trigger enter". This script will basically draw some text onto the screen. GUI.Label(Rect(20, 20, 600,40),"WORLDONE"); for example.

How would i got about to make it so that some 3D Text appears so i can click that text. For example;

If object A(a circle) collides with a box collider, some 3D Text will appear saying something like "click here", and if i were to click there, some other activity will happen.

So, instead of it being GUI.Label, is there some way to change that to 3D.Text?

I hope this makes sense on what i am trying to achieve.

Thank you to whom ever helps

Comment
Add comment
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

2 Replies

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

Answer by Ashkan_gc · Apr 14, 2011 at 12:59 PM

you can have an object with a 3d text component and set it's text property to "" (i.e empty string) and then when the collision event accures you can set the text to what you want. to access the 3dText component, you need to use GetComponent.

there are other ways to do this too. you can add/remove the 3dText component or even instantiate the 3d text object on collision and then destroy it when you don't need it anymore.

Comment
Add comment · Show 1 · 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 Matthew Dennis · Apr 14, 2011 at 01:16 PM 0
Share

so for example;

var tm : Text$$anonymous$$esh = GameObject.GetComponent();

tm.text = "click here";

?

avatar image
0

Answer by Justin Warner · Apr 14, 2011 at 01:01 PM

Quick and dirty way =).

You can model the words "Click Me" (Almost all programs have a text feature, and if you really need one, ask, I can make you one real fast).

And so then, instantiate that when the player does the GUI thing, then you can have an on collision, on trigger, ray, w/e, and if the player does that, you can do the "some other activity".

Hope this helps? Lol.

Comment
Add comment · Show 1 · 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 Matthew Dennis · Apr 14, 2011 at 01:17 PM 0
Share

This kind of did confuse me but thank you for reading my question and answering

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

No one has followed this question yet.

Related Questions

3D Interactive Text 2 Answers

Script appears as null and not null at the same time 1 Answer

Player getting stuck in corners 0 Answers

Weird Collisions Between Paddle and Ball (Breakout) 0 Answers

Replace Text with coresponding 3D Models 1 Answer


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