inheritance is hard

This commit is contained in:
Bel LaPointe
2025-08-22 13:10:53 -06:00
parent d99cd1cd69
commit 3d4e8bd619
7 changed files with 29 additions and 25 deletions

View File

@@ -1,8 +1,13 @@
extends PhysicsBody3D
var mover = new("res://Entities/Characters/Movers/pedal.gd")
var mover := preload("res://Entities/Characters/Movers/pedal.gd").new()
func _physics_process(delta: float):
duo = self.mover.to_move_rotate(delta)
velocity = duo[0]
move_and_slide()
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)
print("vel", vel)
self.move_and_collide(self.velocity)