x


Draw GUI in world space.

I want to "draw" the player's name near the head of the character. How can I do it? Or is it faster to use a child object? It's the same with drawing a health bar...

more ▼

asked Mar 29 '10 at 05:16 AM

Andrew Cherkashin gravatar image

Andrew Cherkashin
53 6 6 15

any examples? can't figure out how to use code form first answer.

Apr 18 '10 at 04:56 AM Andrew Cherkashin
(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Use this script on the wiki, which uses GUIText objects. You can modify it slightly to use GUITextures for a health bar.

more ▼

answered Mar 29 '10 at 05:28 AM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

i forget i need a c# solution, and i have a lot of objects(and positions/names of that objects user receive from server)... may be it's better to create a child objects with label?

Mar 29 '10 at 06:03 AM Andrew Cherkashin

@Andrew Cherkashin: It would be simple to rewrite that in C# if you want. I can't see how child objects would work, considering the names won't be facing the camera (or would be backwards), and would get smaller the farther away the characters are, therefore being unreadable most of the time. You could fix that with scripting, but if you're going to do that, you might as well just use GUIText objects to begin with.

Mar 29 '10 at 06:26 AM Eric5h5

i will try. i just cant figure out how to combine that code with , mine.

Mar 29 '10 at 09:28 AM Andrew Cherkashin
(comments are locked)
10|3000 characters needed characters left

You could use a 3D Text object as a child object for your player (and make it face to the camera).

more ▼

answered Mar 29 '10 at 07:54 AM

efge gravatar image

efge
5.1k 5 14 38

And will this 3D Text be reflected (so that it points toward other (networked) players)?

Dec 18 '10 at 09:22 AM lampshade
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3693
x806
x157

asked: Mar 29 '10 at 05:16 AM

Seen: 3092 times

Last Updated: Mar 29 '10 at 06:01 AM