x


Projecting a square (or another shape) onto terrain

I am attempting to project a small blue square on the terrain. I tried using the blob shadow projector and switching the texture, as well as using a custom shader (like this one), but it projects the texture across a huge square that is larger than the projector size and not showing the texture correctly anyway. It appears as though the texture is stretched across the entire terrain, and only showing a square of it at a time.

I have the texture's wrap mode set to Clamp, I have used multiple different textures (with and without alpha) and still can't seem to project onto terrain properly. I know I can get the projection to work on a small cube object, but I am seeking to project directly onto the terrain in order to follow the contours. Is there some setting I am missing in the shader def, or is this an issue with attempting to project a color/texture onto terrain?

more ▼

asked Jul 28 '10 at 06:21 AM

Calidan gravatar image

Calidan
1 1 1 5

Is the square not to be projected beneath the character rather than the camera? If so, you should edit the topic of your question.

Jul 28 '10 at 03:23 PM skovacs1

Well I had meant the camera that is attached to the character, but you are correct that "character" makes it more clear, so I updated it. Thanks for the suggestion!

Jul 29 '10 at 05:45 AM Calidan

You haven't set up your light cookie properly. This can cause the projector to project the mesh onto the entire object, not just at the position you have the projector. http://unity3d.com/support/documentation/Manual/HOWTO-LightCookie.html

Aug 04 '10 at 06:11 AM qJake
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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:

x1652
x109

asked: Jul 28 '10 at 06:21 AM

Seen: 2086 times

Last Updated: Aug 03 '10 at 09:38 PM