From 9d54a9d412ee4f9656b0513912fdc9033384d334 Mon Sep 17 00:00:00 2001 From: yuni Date: Tue, 11 Jun 2024 05:59:10 +0200 Subject: [PATCH] add scene's coordinates to scene object's coordinates --- src/cmd.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cmd.rs b/src/cmd.rs index bd37443..4f08c74 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -707,7 +707,11 @@ fn spawn_scenes( "cruiser" => { let mut state = ParserState::default(); state.class = DefClass::Actor; - state.pos = DVec3::new(pos[0], -pos[2], pos[1]); + state.pos = DVec3::new( + root_state.pos[0] + pos[0], + root_state.pos[1] - pos[2], + root_state.pos[2] + pos[1], + ); state.model = Some("cruiser".to_string()); state.rotation = Quat::from_euler(EulerRot::XYZ, rot[0], rot[1], rot[2]);