From 3078591060f2fd351c2201c48f04a0609abfe32b Mon Sep 17 00:00:00 2001 From: timokoesters Date: Sun, 6 Oct 2019 21:21:33 +0200 Subject: [PATCH 1/2] feat(bow): arrow spawn height --- server/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/lib.rs b/server/src/lib.rs index 6689553393..dfecc453b8 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -297,12 +297,16 @@ impl Server { dir, projectile, } => { - let pos = state + let mut pos = state .ecs() .read_storage::() .get(entity) .unwrap() .0; + + // TODO: Player height + pos.z += 1.2; + Self::create_projectile( state, comp::Pos(pos), From 25cc1f0103decf3a5cb26d1d28d35ee6c7156ee2 Mon Sep 17 00:00:00 2001 From: timokoesters Date: Sun, 6 Oct 2019 22:03:29 +0200 Subject: [PATCH 2/2] fix: orientation now supports z rotation --- voxygen/src/scene/figure/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/voxygen/src/scene/figure/mod.rs b/voxygen/src/scene/figure/mod.rs index aec533c3cf..72cceca089 100644 --- a/voxygen/src/scene/figure/mod.rs +++ b/voxygen/src/scene/figure/mod.rs @@ -548,6 +548,7 @@ impl FigureState { let mat = Mat4::::identity() * Mat4::translation_3d(self.pos) * Mat4::rotation_z(-ori.x.atan2(ori.y)) + * Mat4::rotation_x(ori.z.atan2(Vec2::from(ori).magnitude())) * Mat4::scaling_3d(Vec3::from(0.8 * scale)); let locals = FigureLocals::new(mat, col);