sl@cccfr.de лет назад: 2
Родитель
Сommit
bad9754765
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      Player.gd

+ 3 - 2
Player.gd

@@ -69,6 +69,7 @@ func _physics_process(delta):
 	up = global_transform.origin.normalized()
 	right = forward.cross(up).normalized()
 	forward = up.cross(right).normalized()
+	transform.basis = Basis(right, up, -forward)
 	
 	if can_move and (is_on_floor() or allow_fall_input):
 		
@@ -108,10 +109,10 @@ func _physics_process(delta):
 
 	velocity = velocity.linear_interpolate(dir * (move_speed_sprint if move_sprint else move_speed), move_acceleration * delta)
 	if !is_on_floor():
-		velocity += -up * gravaty * delta
+		velocity -= up * gravaty
 	velocity = move_and_slide(velocity, up)
 	
-	transform = transform.looking_at(transform.origin + forward, up)
+	
 	
 	
 	#Smooth movement