WIP: Migrating to node3ds

This commit is contained in:
Nikolai Rodionov 2025-02-09 23:10:11 +01:00
parent 6441456788
commit 1b7c77a05b
Signed by: allanger
GPG Key ID: 09F8B434D0FDD99B

View File

@ -23,8 +23,8 @@ func _process(delta):
# -- This code is 100% generated by chatGPT and I can't understand it fully yet
var position_difference := global_position - owner_placeholder.global_position
if is_vector_a_lower_than_b(position_difference, Vector3(0.3, 0.3, 0.3)) and \
is_vector_a_lower_than_b(Vector3(-0.3, -0.3, -0.3), position_difference):
if is_vector_a_lower_than_b(position_difference, Vector3(0.5, 0.5, 0.5)) and \
is_vector_a_lower_than_b(Vector3(-0.5, -0.5, -0.5), position_difference):
var server_pos = owner_placeholder.global_transform.origin
pseudo_velocity = (server_pos - previous_position) / delta
previous_position = server_pos # Store for next frame