Browse Source

trying to figure out animations

master
JoshuaReason 5 years ago
parent
commit
36e42c3d13
2 changed files with 4 additions and 0 deletions
  1. +3
    -0
      Assets/Scipts/PlayerControllers/Player.cs
  2. +1
    -0
      Assets/Scipts/PlayerControllers/RemotePlayer.cs

+ 3
- 0
Assets/Scipts/PlayerControllers/Player.cs View File

@ -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));

+ 1
- 0
Assets/Scipts/PlayerControllers/RemotePlayer.cs View File

@ -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;

Loading…
Cancel
Save