29-04-2021, 11:14 PM
(This post was last modified: 29-04-2021, 11:42 PM by timconkling.)
I have a medium sizedĀ terrain (128 width, 128 length, 600 height) that I'd like to get cloth collisions working with. (The main character in my game has a gown that drags along the ground behind her.)
I've attached an ObiCollider to the terrain object, which works fine - but the framerate suffers a bit. So I decided to try using a distance field instead: I used a tool to create a mesh from the terrain data, used that mesh to generate a distance field, and then assigned the distance field to the ObiCollider that sits on the terrain. (The terrain is still a proper Unity Terrain object - the mesh was just an intermediate object).
Performance is better, but the collisions produced by the distance field are pretty bad - at rest, the gown sits visibly above the ground, and gets far more bunched up, wrinkled, and rumpled.
I've attached two screenshots, one using the distance field and one not. (Argh - why does theĀ forum limit these to 100kb each ?!?!?)
NOT using a distance field:
USING a distance field:
Is what I'm doing a bad idea, for some reason - or am I misconfiguring something?
I've attached an ObiCollider to the terrain object, which works fine - but the framerate suffers a bit. So I decided to try using a distance field instead: I used a tool to create a mesh from the terrain data, used that mesh to generate a distance field, and then assigned the distance field to the ObiCollider that sits on the terrain. (The terrain is still a proper Unity Terrain object - the mesh was just an intermediate object).
Performance is better, but the collisions produced by the distance field are pretty bad - at rest, the gown sits visibly above the ground, and gets far more bunched up, wrinkled, and rumpled.
I've attached two screenshots, one using the distance field and one not. (Argh - why does theĀ forum limit these to 100kb each ?!?!?)
NOT using a distance field:
USING a distance field:
Is what I'm doing a bad idea, for some reason - or am I misconfiguring something?