dave: better initial rotation
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -276,8 +276,15 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
|
|||||||
uniform_buffer,
|
uniform_buffer,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let initial_rot = {
|
||||||
|
let x_rotation = Quaternion::from_axis_angle(&Vec3::new(1.0, 0.0, 0.0), 0.5);
|
||||||
|
let y_rotation = Quaternion::from_axis_angle(&Vec3::new(0.0, 1.0, 0.0), 0.5);
|
||||||
|
|
||||||
|
// Apply rotations (order matters)
|
||||||
|
y_rotation.multiply(&x_rotation)
|
||||||
|
};
|
||||||
Self {
|
Self {
|
||||||
rotation: Quaternion::identity(),
|
rotation: initial_rot,
|
||||||
rot_dir: Vec3::new(0.0, 0.0, 0.0),
|
rot_dir: Vec3::new(0.0, 0.0, 0.0),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ use std::sync::Arc;
|
|||||||
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
|
use time::{format_description::well_known::Rfc3339, OffsetDateTime};
|
||||||
|
|
||||||
pub use avatar::DaveAvatar;
|
pub use avatar::DaveAvatar;
|
||||||
use egui::{Rect, Vec2};
|
|
||||||
use egui_wgpu::RenderState;
|
use egui_wgpu::RenderState;
|
||||||
|
|
||||||
pub use quaternion::Quaternion;
|
pub use quaternion::Quaternion;
|
||||||
|
|||||||
Reference in New Issue
Block a user