$begingroup$

I’m new to sport improvement, and I have to make a sport the place the participant digs a gap within the floor wherever on the terrain like this sport however there might be no restrict the participant will dig till he fell into one other terrain. the issue is I do not know the way to do that or whether it is even attainable. I’ve performed numerous analysis however I didn’t discover something helpful about gap digging.

What I want precisely is dig a gap, I’m considering of constructing two terrains above one another, the participant might be on the highest higher terrain and he can dig a gap in that terrain till he falls within the terrain beneath.

Dev is a brand new contributor to this web site. Take care in asking for clarification, commenting, and answering.
Take a look at our Code of Conduct.

$endgroup$

7

$begingroup$

The Unity Terrain part has a property .terrainData which lets you entry and alter the terrain at runtime. This property returns a TerrainData object. This object has two strategies which you will have for this mission.

  • SetHeights which lets you exchange the heightmap values of an oblong space
  • SetHoles which lets you exchange which coordinates of an oblong space of the heightmap are “holes”. A “gap” is not rendered and permits rigidbodies to fall via the terrain.

Observe that the Unity default terrain is a heightmap, which implies that it doesn’t enable overhangs, tunnels or caves. However there are different third social gathering terrain property out there on the asset retailer which do enable this.

$endgroup$

9


You could log in to reply this query.


Not the reply you are in search of? Browse different questions tagged .