fx: player rotation
This commit is contained in:
parent
487062e25c
commit
c9880d9b35
|
|
@ -34,8 +34,7 @@ func _process(delta):
|
|||
try_attack()
|
||||
|
||||
if not velocity.is_zero_approx():
|
||||
look_at(velocity * 1000000) # FIXME: ideally we look_at a point at infinity
|
||||
# or rotate the player some other way
|
||||
self.rotation = atan2(velocity.y, velocity.x)
|
||||
move_and_collide(speed * velocity * delta)
|
||||
#position += speed * velocity * delta
|
||||
position = GameManager.get_boundaried_position(position)
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ func _process(delta: float) -> void:
|
|||
_handle_wrapping()
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
#self.move(Vector3(randfn(0, 1), randfn(0, 1), 0))
|
||||
# TODO: state transition logic (bot controller code)
|
||||
pass
|
||||
|
||||
func move(motion: Vector3) -> void:
|
||||
|
|
|
|||
Loading…
Reference in New Issue