mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix: orientation now supports z rotation
This commit is contained in:
parent
3078591060
commit
25cc1f0103
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user