Switch player to area teleport
I previously added in a "body" detected teleportation, but it was flickering weirdly.. It is solvable with checking the dot product for bodies passing the portal threshold tho. Someday
This commit is contained in:
1 parent
16d7841e6e
commit
f24fc0b3c1
2 files changed
+18
-4
No files matched your search
@@ -26,5 +26,5 @@ func _on_area_entered(area: Area3D) -> void:
|
||||
root.global_transform = _parent_portal.real_to_exit_transform(root.global_transform)
|
||||
|
||||
func _on_body_entered(body: Node3D) -> void:
|
||||
if body.has_meta("teleportable"):
|
||||
if body.get_meta("teleportable", false) == true:
|
||||
body.global_transform = _parent_portal.real_to_exit_transform(body.global_transform)
|
||||
Reference in new issue
Block a user