add scene's coordinates to scene object's coordinates

This commit is contained in:
yuni 2024-06-11 05:59:10 +02:00
parent f2246a247f
commit 9d54a9d412

View file

@ -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]);