Fix respawn making the player fall through the ground
This commit is contained in:
3 files changed
+3
-3
No files matched your search
@@ -367,7 +367,7 @@ public class AutoGamePlayer : MonoBehaviour {
|
||||
|
||||
void Respawn() {
|
||||
bird.GetComponent<RectTransform>().anchoredPosition = new UnityEngine.Vector3(0f, 64f, 0f);
|
||||
groundCollider.transform.position = new(0f, groundCollider.transform.position.y);
|
||||
groundCollider.GetComponent<RectTransform>().anchoredPosition = new(0f, -2.5f);
|
||||
bird.transform.localScale = new UnityEngine.Vector3(1f, 1f, 1f);
|
||||
rb.linearVelocity = new();
|
||||
score = 0;
|
||||
|
||||
@@ -528,7 +528,7 @@ public class CustomGamePlayer : MonoBehaviour {
|
||||
|
||||
void Respawn() {
|
||||
bird.GetComponent<RectTransform>().anchoredPosition = new UnityEngine.Vector3(0f, 64f, 0f);
|
||||
groundCollider.transform.position = new(0f, groundCollider.transform.position.y);
|
||||
groundCollider.GetComponent<RectTransform>().anchoredPosition = new(0f, -2.5f);
|
||||
bird.transform.localScale = new UnityEngine.Vector3(1f, 1f, 1f);
|
||||
rb.linearVelocity = new();
|
||||
score = 0;
|
||||
|
||||
@@ -315,7 +315,7 @@ public class GamePlayer : MonoBehaviour {
|
||||
|
||||
void Respawn() {
|
||||
bird.GetComponent<RectTransform>().anchoredPosition = new UnityEngine.Vector3(0f, 64f, 0f);
|
||||
groundCollider.transform.position = new(0f, groundCollider.transform.position.y);
|
||||
groundCollider.GetComponent<RectTransform>().anchoredPosition = new(0f, -2.5f);
|
||||
bird.transform.localScale = new UnityEngine.Vector3(1f, 1f, 1f);
|
||||
rb.linearVelocity = new();
|
||||
score = 0;
|
||||
|
||||
Reference in new issue
Block a user