"Viscosity" property on voxel meshes

This property would be a value between 0 and 1 inclusive. A value of 0 would behave the same as a voxel mesh with collision turned off - the player falls through it as if it is not there. A value of 1 would behave the same as if collision was turned on - the player would collide with it.

Every value between 0 and 1 exclusive would allow the player to pass through the mesh progressively slower.

For example,
A water voxel might have a viscosity of 0.25. The player can pass through it, but they do so slightly slower than if collision was turned off. In addition, they can “swim” in the voxel, moving up/down/etc.

Why I want this:
There’s a number of solid voxels that would benefit from a “slow sink” kind of interaction. For example, falling on Lava at the moment has 2 situations:

  1. You fall on the lava, you hit the lava and die, then lay on top of it.
  2. You fall on the lava, fall through it and die, then immediately fall to the bottom where we’ve placed some solid voxel.

Ideally, the player would hit the lava, die, and slowly sink.

1 Like