Fix falling through the ground on respawn

This commit is contained in:
Lncvrt committed 2026-02-23 19:22:11 -07:00
1 parent e9c560f59e
commit 58299d0e57
3 files changed
+3

No files matched your search

@@ -366,6 +366,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);
bird.transform.localScale = new UnityEngine.Vector3(1f, 1f, 1f);
rb.gravityScale = 0f;
rb.linearVelocity = UnityEngine.Vector2.zero;
@@ -527,6 +527,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);
bird.transform.localScale = new UnityEngine.Vector3(1f, 1f, 1f);
rb.gravityScale = 0f;
rb.linearVelocity = UnityEngine.Vector2.zero;
+1
View File
@@ -314,6 +314,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);
bird.transform.localScale = new UnityEngine.Vector3(1f, 1f, 1f);
rb.gravityScale = 0f;
rb.linearVelocity = UnityEngine.Vector2.zero;