From b982ffb7c431416d70a241b7f7e33eb856bf358e Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Sat, 10 Jun 2023 17:00:08 -0400 Subject: [PATCH] No more KSP --- levels/test_level.tscn | 2 +- player/player.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/levels/test_level.tscn b/levels/test_level.tscn index 6fc7d30..6fc9ccf 100644 --- a/levels/test_level.tscn +++ b/levels/test_level.tscn @@ -16,4 +16,4 @@ data = { metadata/_editor_floor_ = Vector3(0, 0, 0) [node name="player" parent="." instance=ExtResource("2_ojnju")] -transform = Transform3D(1, 0, 0, 0, 0.899123, 0.437696, 0, -0.437696, 0.899123, -0.0803165, 7.03628, 6.2505) +transform = Transform3D(1, 0, 0, 0, 0.388867, 0.921294, 0, -0.921294, 0.388867, -2.76897, 18.3017, 8.82022) diff --git a/player/player.cs b/player/player.cs index dd9aa42..165c2e5 100644 --- a/player/player.cs +++ b/player/player.cs @@ -33,12 +33,12 @@ public partial class player : Camera3D this.Translate(new Vector3(0, 0, (float)delta*10)); this.Rotation += rot; - if (_wIn) + if (_wIn && this.Position.Z > 3) this.Translate(new Vector3(0, 0, (float)-delta*10)); - if (_wOut) + if (_wOut && this.Position.Z < 12) this.Translate(new Vector3(0, 0, (float)delta*10)); - _con.Set("text", this.Rotation); + _con.Set("text", this.Position); } public override void _Input(InputEvent @event)