Fix yaw calculation.
This commit is contained in:
parent
5f14a90b92
commit
4495174be0
|
@ -482,7 +482,7 @@ pub trait GlobalTransformExt {
|
||||||
|
|
||||||
impl GlobalTransformExt for GlobalTransform {
|
impl GlobalTransformExt for GlobalTransform {
|
||||||
fn yaw(&self) -> Angle {
|
fn yaw(&self) -> Angle {
|
||||||
let forward = self.forward();
|
let forward = self.right();
|
||||||
Angle::Radians(forward.y.atan2(forward.x))
|
Angle::Radians(forward.y.atan2(forward.x))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user