Make Shello rotate towards the player before jumping (this still needs work)
Convert all scripts to used tagged Player. Try to keep Shello on the ground while walking (not sure if this works yet). Fix transition from excitement to walking to happen immediately.
This commit is contained in:
1 parent
3f9ac3eb81
commit
12145753f0
11 files changed
+1671
-848
No files matched your search
@@ -5,19 +5,25 @@ using UnityEngine.AI;
|
||||
|
||||
public class FollowerController : MonoBehaviour
|
||||
{
|
||||
public Transform target;
|
||||
public float wakeDistance;
|
||||
|
||||
private NavMeshAgent agent;
|
||||
private AudioSource audioSource;
|
||||
private Animator[] anims;
|
||||
private bool isFollowing = false;
|
||||
private Transform target;
|
||||
|
||||
void Start()
|
||||
{
|
||||
agent = GetComponent<NavMeshAgent>();
|
||||
anims = GetComponentsInChildren<Animator>();
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
|
||||
var players = GameObject.FindGameObjectsWithTag("Player");
|
||||
if (players?.Length > 0)
|
||||
{
|
||||
target = players[0].transform;
|
||||
}
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
Reference in new issue
Block a user