x


Guitexture for targets

How would i draw a guitexture that is always over one gameobject?

more ▼

asked May 09 '10 at 12:39 PM

Fishman92 gravatar image

Fishman92
2.4k 101 113 128

Can't you use a mesh instead? GUI items will render over physical objects so you can see them through walls

May 09 '10 at 03:53 PM spinaljack
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Use a script like this...it uses GUIText, but you can change that to GUITexture easily enough.

more ▼

answered May 09 '10 at 02:15 PM

Eric5h5 gravatar image

Eric5h5
80.3k 42 132 521

I tried this, but it gives really odd results, the mesh of the object just dissapears and is very far away from where it should be... what's happening?

May 09 '10 at 03:22 PM Fishman92

@Fishman92: Sounds like you're not using it correctly, because the script doesn't affect the game object at all, it's just for the GUIText object.

May 09 '10 at 04:15 PM Eric5h5

got it to work, but how do i scale down the texture?? It's huge!

May 09 '10 at 06:24 PM Fishman92

@Fishman92: Either change the scale, or change the pixel inset values.

May 09 '10 at 07:46 PM Eric5h5

tried this, but it doesn't always go directly over the target, depending on where you're looking from; it often appears quite away above but other times dead on.

May 09 '10 at 08:00 PM Fishman92
(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:

x2097
x478

asked: May 09 '10 at 12:39 PM

Seen: 1643 times

Last Updated: May 09 '10 at 12:39 PM