Merge branch 'timo-arrowheight' into 'master'

timo arrow spawn height

See merge request veloren/veloren!558
This commit is contained in:
Joshua Barretto 2019-10-06 20:19:01 +00:00
commit 1a9408c397
2 changed files with 6 additions and 1 deletions

View File

@ -297,12 +297,16 @@ impl Server {
dir,
projectile,
} => {
let pos = state
let mut pos = state
.ecs()
.read_storage::<comp::Pos>()
.get(entity)
.unwrap()
.0;
// TODO: Player height
pos.z += 1.2;
Self::create_projectile(
state,
comp::Pos(pos),

View File

@ -548,6 +548,7 @@ impl<S: Skeleton> FigureState<S> {
let mat = Mat4::<f32>::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);