fix: orientation now supports z rotation

This commit is contained in:
timokoesters 2019-10-06 22:03:29 +02:00
parent 3078591060
commit 25cc1f0103
No known key found for this signature in database
GPG Key ID: CD80BE9AAEE78097

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