浏览代码

the water mesh now is transformed with the same scaling as the gameobject it is on (#105)

/release-2019.4-LTS
Andre McGrail 4 年前
当前提交
508799c1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 2
      Packages/com.verasl.water-system/Scripts/Water.cs

2
Packages/com.verasl.water-system/Scripts/Water.cs


newPos.x = quantizeValue * (int) (newPos.x / quantizeValue);
newPos.z = quantizeValue * (int) (newPos.z / quantizeValue);
var matrix = Matrix4x4.TRS(newPos + transform.position, Quaternion.identity, Vector3.one); // transform.localToWorldMatrix;
var matrix = Matrix4x4.TRS(newPos + transform.position, Quaternion.identity, transform.localScale); // transform.localToWorldMatrix;
foreach (var mesh in resources.defaultWaterMeshes)
{

正在加载...
取消
保存