Sport Improvement Stack Alternate is a query and reply web site for skilled and impartial sport builders. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
One of the best solutions are voted up and rise to the highest
Requested
Considered
59 occasions
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.
$endgroup$
7
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 spaceSetHoles
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 unity terrain .
lang-cs