This repository was archived by the owner on Mar 8, 2023. It is now read-only.
extractAttitude question #2253
Unanswered
blueRaining
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
@blueRaining , it seems that one of them is wrong. The roll value in the function in the MapView is just used for the What do you mean by |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
this is MapViewUtils.extractAttitude
if (d < 1.0 - Number.EPSILON) {
if (d > -1.0 + Number.EPSILON) {
yaw = Math.atan2(space.z.x, -space.z.y);
pitch = Math.acos(space.z.z);
//HERE************************
roll = Math.atan2(space.x.z, space.y.z);
//****************************************************************************
} else {
// Looking bottom-up with space.z.z == -1.0
yaw = -Math.atan2(-space.y.x, space.x.x);
pitch = 180;
roll = 0;
}
}
this is MapView.extractAttitude
if (d < 1.0 - epsilon) {
if (d > -1.0 + epsilon) {
yaw = Math.atan2(transform.zAxis.x, -transform.zAxis.y);
roll is different
can we use camera euler to replace it?
Beta Was this translation helpful? Give feedback.
All reactions