summaryrefslogtreecommitdiffstats
path: root/World.gd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--World.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/World.gd b/World.gd
index 09b8e85..c0d224b 100644
--- a/World.gd
+++ b/World.gd
@@ -3,7 +3,8 @@ extends RigidBody
export var acceleration = 10.0;
func travel(direction:Vector3):
- var boat_direction = $"/root/Main/Raft".global_transform.basis
+ var boat = $"/root/Main/Raft"
+ var boat_direction = boat.global_transform.basis
boat_direction = Basis(Vector3.UP*boat_direction.get_euler().y)
direction = -direction
direction = boat_direction * direction