From a2f4fce70541f722d3edc2283c4bf4374ef6a558 Mon Sep 17 00:00:00 2001 From: Bel LaPointe <153096461+breel-render@users.noreply.github.com> Date: Sun, 2 Mar 2025 14:33:28 -0700 Subject: [PATCH] finish hello world just to be sure physics process werks --- src/rust/src/player.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rust/src/player.rs b/src/rust/src/player.rs index f1b38ae..a8c0998 100644 --- a/src/rust/src/player.rs +++ b/src/rust/src/player.rs @@ -8,12 +8,16 @@ struct BreeLPlayer { #[godot_api] impl ISprite2D for BreeLPlayer { fn init(base: Base) -> Self { - eprintln!("init"); BreeLPlayer{base: base} } fn physics_process(&mut self, delta: f64) { - eprintln!("physics_process({delta})"); + let radians = (1.0 * delta) as f32; + self.base_mut().rotate(radians); + + let rotation = self.base().get_rotation(); + let velocity = Vector2::UP.rotated(rotation) * 200 as f32; + self.base_mut().translate(velocity * delta as f32); } }