feat (orbiting spere): create a sphere that orbiting around thats mimic the living root behaviour
This commit is contained in:
@@ -7,6 +7,7 @@ public class SlowdownArea : MonoBehaviour
|
||||
public float maxSlow;
|
||||
public float slowSpeed;
|
||||
public float timer;
|
||||
public GameObject playerBody;
|
||||
|
||||
[Header("Root Crawler")]
|
||||
public GameObject rootCrawlerPrefab;
|
||||
@@ -26,9 +27,10 @@ public class SlowdownArea : MonoBehaviour
|
||||
jump.JumpForce = 1.5f;
|
||||
isInZone = true;
|
||||
if (currentCrawler == null) {
|
||||
currentCrawler = Instantiate(rootCrawlerPrefab, player.transform.position, Quaternion.identity);
|
||||
RootCrawler crawler = currentCrawler.GetComponent<RootCrawler>();
|
||||
crawler.target = player.transform;
|
||||
currentCrawler = Instantiate(rootCrawlerPrefab);
|
||||
|
||||
RootCrawler crawler = currentCrawler.GetComponent<RootCrawler>();
|
||||
crawler.target = playerBody.transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user