x


"dig a hole" in terrain when tool touch it

Hi (again), I want to know how can I do this:

When Tool:Collider touch Terrain do
 Terrain.Transform:
  Shape = Shapes.Hole,
  CoordX = Tool.X,
  CoordY = Tool.Y,
  CoordZ = Tool.Z
 end function
end when

I want to know how to make it in JS or C# (preferably JS).

more ▼

asked Jul 29 '12 at 07:01 PM

williampigmeu gravatar image

williampigmeu
76 4 13 19

Something that I can attach to Terrain or Tool and configure the hole size.

Jul 29 '12 at 07:02 PM williampigmeu

And, is not a real hole, something like "when tool touch terrain, set terrain height -10 in tool touch coord".

Jul 29 '12 at 07:09 PM williampigmeu

terrain doesn't support holes, you can only move heights. this script will not just few lines. you should work with

http://docs.unity3d.com/Documentation/ScriptReference/TerrainData.html

to achieve that

Jul 29 '12 at 07:10 PM ScroodgeM

I know, this is just an algorithm, and I said, it's not a real hole, is to decrease height.

Jul 29 '12 at 07:55 PM williampigmeu
(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:

x1707
x1478
x1282
x37
x19

asked: Jul 29 '12 at 07:01 PM

Seen: 379 times

Last Updated: Jul 29 '12 at 07:55 PM