From 36e42c3d13a0b138f77130007ce0067b5056a36c Mon Sep 17 00:00:00 2001 From: JoshuaReason Date: Sun, 27 Jan 2019 12:14:09 +1100 Subject: [PATCH] trying to figure out animations --- Assets/Scipts/PlayerControllers/Player.cs | 3 +++ Assets/Scipts/PlayerControllers/RemotePlayer.cs | 1 + 2 files changed, 4 insertions(+) diff --git a/Assets/Scipts/PlayerControllers/Player.cs b/Assets/Scipts/PlayerControllers/Player.cs index 6f6202a..3bda47f 100644 --- a/Assets/Scipts/PlayerControllers/Player.cs +++ b/Assets/Scipts/PlayerControllers/Player.cs @@ -49,6 +49,9 @@ public class Player : MonoBehaviour public void UpdateDummies() { + if (dummies.Count < 4) + return; + dummies[0].transform.position = transform.position - (Vector3.right * (map.TileSize * map.MapDimensions.x * scale)); dummies[1].transform.position = transform.position + (Vector3.right * (map.TileSize * map.MapDimensions.x * scale)); dummies[2].transform.position = transform.position - (Vector3.forward * (map.TileSize * map.MapDimensions.y * scale)); diff --git a/Assets/Scipts/PlayerControllers/RemotePlayer.cs b/Assets/Scipts/PlayerControllers/RemotePlayer.cs index 578df87..9568427 100644 --- a/Assets/Scipts/PlayerControllers/RemotePlayer.cs +++ b/Assets/Scipts/PlayerControllers/RemotePlayer.cs @@ -18,6 +18,7 @@ public class RemotePlayer : Player { private void DoAnimation() { + Debug.Log("Updating remote Animation"); Vector3 dir = lastPosition - transform.position; Animator.SetFloat("WalkSpeed", dir.magnitude); transform.forward = dir.normalized;