WIP: Migrating to node3ds
This commit is contained in:
parent
5a0e3cc6b9
commit
691e0ea8bc
@ -44,7 +44,6 @@ func _physics_process(delta: float) -> void:
|
||||
if not shared_node.is_on_floor():
|
||||
shared_node.velocity += shared_node.get_gravity() * delta
|
||||
if shared_node.is_on_floor() && jumping:
|
||||
print("jumping" + str(name))
|
||||
shared_node.velocity.y = consts.DEFAULT_JUMP_VELOCITY
|
||||
jumping = false
|
||||
var direction := (shared_node.transform.basis * Vector3(input_direction.x, 0, input_direction.y)).normalized()
|
||||
@ -60,9 +59,10 @@ func _physics_process(delta: float) -> void:
|
||||
update_position.rpc(shared_node.global_position)
|
||||
shared_node.move_and_slide()
|
||||
|
||||
|
||||
@rpc("authority", "call_remote", "unreliable_ordered")
|
||||
func update_position(real_position: Vector3):
|
||||
shared_node.global_position = lerp(shared_node.global_position, real_position, 1.0)
|
||||
shared_node.global_position = lerp(shared_node.global_position, real_position, 10.0)
|
||||
|
||||
@rpc("any_peer", "call_local", "unreliable")
|
||||
func jump():
|
||||
|
@ -19,7 +19,6 @@ var can_shoot: bool = true
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
cooldown_timer.wait_time = cooldown
|
||||
print("test")
|
||||
|
||||
|
||||
@onready var bullet_trace_distance: Node3D = $BulletTraceDistance
|
||||
|
Loading…
Reference in New Issue
Block a user