Fix respawn making the player fall through the ground

This commit is contained in:
Lncvrt committed 2026-03-03 23:22:41 -07:00
1 parent f3fee721ad
commit f8a75c7879
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;