您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
19 行
451 B
19 行
451 B
using System;
|
|
using UnityEngine;
|
|
using MLAPI;
|
|
|
|
[DefaultExecutionOrder(200)]
|
|
public class PositionInterpolation : Interpolation<Vector3>
|
|
{
|
|
public override Func<Vector3, Vector3, float, Vector3> LerpFunction => Vector3.LerpUnclamped;
|
|
|
|
private void Update()
|
|
{
|
|
var value = GetValueForTime(NetworkingManager.Singleton.NetworkTime);
|
|
if (!float.IsNaN(value.x))
|
|
{
|
|
transform.position = value;
|
|
}
|
|
|
|
}
|
|
}
|