13 lines
391 B
GDScript
13 lines
391 B
GDScript
extends PhysicsBody3D
|
|
|
|
var mover: Mover = preload("res://Entities/Characters/Movers/mover.gd").new()
|
|
|
|
func _physics_process(delta: float):
|
|
var duo = self.mover.to_move_rotate(self.global_transform, delta)
|
|
self._physics_process_with(duo[0], duo[1])
|
|
|
|
func _physics_process_with(vel, rot):
|
|
self.velocity = vel
|
|
self.rotate_object_local(Vector3.UP, rot)
|
|
self.move_and_collide(self.velocity)
|