alteous on master
Release 0.4.0 Merge pull request #4 from alte… (compare)
alteous on v0.4
Release 0.4.0 (compare)
alteous on v0.4
Release 0.4.0 (compare)
alteous on master
Update cgmath and mint. Merge pull request #3 from plop… (compare)
alteous on master
Bump crate version to 0.3 Implement MulAssign for Quat Add Quat::rotate (compare)
alteous on master
Mat::invert -> Mat::inverse Add Quat::euler impl AddAssign for Vec and 8 more (compare)
mesh.set_orientation(Quat::from_angle_y(Rad(PI)));
?
- mesh.set_orientation(Quat::euler(vec3!(0.0, PI, 0.0)));
This only confuses matters. You've already fixed the vertex winding order.
- let new_orientation = Quat::axis_angle(vec3!(1.0, 0.0, 0.0), self.rotation) * self.orientation;
+ let new_orientation = Quat::axis_angle(vec3!(0.0, 0.0, 1.0), self.rotation);
You don't need this extra multiplication. Now the rotation around the Z axis behaves as intended.
+ let mut dv = new_orientation.rotate(vec3!(0.0, 1.0, 0.0));
This now behaves as intended, although I'm not familiar enough with quaternions to know if this should actually work.
if input.hit(three::Key::A) {
self.rotation += SHIP_ROTATION_SPEED * input.delta_time();
}
if input.hit(three::Key::D) {
self.rotation -= SHIP_ROTATION_SPEED * input.delta_time();
}