SmoothingDelay
How do I use Smoothing Delay
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
39 | transform.position = Vector3.Lerp(transform.position, correctPlayerPos, Time.deltaTime * this.SmoothingDelay); | 1 |
File name: SmoothSyncMovement.cs
Copy
34 public void Update()
35 {
36 if (!photonView.isMine)
37 {
38 //Update remote player (smooth this, this looks good, at the cost of some accuracy)
39 transform.position = Vector3.Lerp(transform.position, correctPlayerPos, Time.deltaTime * this.SmoothingDelay);
40 transform.rotation = Quaternion.Lerp(transform.rotation, correctPlayerRot, Time.deltaTime * this.SmoothingDelay);
41 }
42 }
SmoothingDelay 117 lượt xem
Gõ tìm kiếm nhanh...