- Home /
put blanket on the ground
I want to be able to instantiate an object that can be placed on the ground that behaves basically like a blanket - if my ground is flat the object can be flat, if my ground his bumpy I want the object to be bumpy like the ground.
I don't know exactly how to do it. and perhaps there is no way, it doesn't really have to be an instantiated object, I guess I could use maybe some sort of particle emitter or something to outline the area of ground I want to designate.
but I thought maybe someone on here could give me some advice on how to do it. or what to do.
I thought of making a sphere collider and everywhere the sphere collides with the ground do something to designate that point. but I don't know. any one have any ideas?
or maybe I can change the way the terrain looks in game at a specific point I don't know.
Answer by Jared G. · Oct 11, 2010 at 12:31 AM
You are thinking of decals (you'll have much better luck searching under this term than 'blankets' :-) ). They are typically used for scorch marks, bullet holes, and blob shadows.
Roughly, a decal is created by duplicating and chopping a section of a mesh (in your case, a terrain) applying your scorch-mark texture, and placing just above the original (or higher z-index.)
Here is a run-down and some math from a great book: Applying Decals to Arbitrary Surfaces
A few unity users have implemented decals themselves, and there are some extensions available. Also note that decals are being reviewed as a possible feature for an upcoming unity release.
Edit: A quick and dirty solution may be to use the projector in Unity, but has a performance cost if you create quite a few of them, and you may not get quite the effect you want...
Your answer
![](https://koobas.hobune.stream/wayback/20220613072302im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to add decals to terrain texture? 1 Answer
Creating decal, terrain normals not working 1 Answer
Displaying a picture on terrain under moving actor 0 Answers
Make a simple tree 1 Answer
Terrain deformation in networking? 0 Answers