Now About Social Code
summaryrefslogtreecommitdiff
path: root/scripts/player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/player.gd')
-rw-r--r--scripts/player.gd5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/player.gd b/scripts/player.gd
index e76b4d1..f476bf0 100644
--- a/scripts/player.gd
+++ b/scripts/player.gd
@@ -65,7 +65,10 @@ func fire_weapon() -> void:
bullet.position = starting_pos
bullet.target = end
get_tree().get_root().add_child(bullet)
- bullet.look_at(end)
+ var up = Vector3.UP
+ if abs(global_transform.basis.z.y) > 0.99:
+ up = Vector3(0, 0, 1)
+ bullet.look_at(end, up)
func _physics_process(_delta: float) -> void:
do_grapple()