浮漂脚本修改
This commit is contained in:
16
Assets/Scripts/Test/New/SimpleWaterSurfaceProvider.cs
Normal file
16
Assets/Scripts/Test/New/SimpleWaterSurfaceProvider.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class SimpleWaterSurfaceProvider : MonoBehaviour, IWaterSurfaceProvider
|
||||
{
|
||||
public float waterLevel = 0f;
|
||||
|
||||
public float GetWaterHeight(Vector3 worldPos)
|
||||
{
|
||||
return waterLevel;
|
||||
}
|
||||
|
||||
public Vector3 GetWaterNormal(Vector3 worldPos)
|
||||
{
|
||||
return Vector3.up;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user