Caelum points axis Z towards South instead of North

Bug #307937 reported by Alexey Torkhov
2
Affects Status Importance Assigned to Milestone
Ember
In Progress
Medium
Alexey Torkhov

Bug Description

Caelum has the following code snippet:
        res.z = -Math::Cos (azimuth) * Math::Cos (altitude); // North
        res.x = Math::Sin (azimuth) * Math::Cos (altitude); // East
        res.y = -Math::Sin (altitude); // Zenith

as azimuth measured clockwise from North = 0, then, if we look towards North, res.z is negative, it means it points to South. To solve it, res.z and res.x should be mirrored.

If this'll be confirmed it should be reported upstream.

Tags: caelum
Revision history for this message
Erik Ogenvik (erik-ogenvik) wrote :

Hmm, are you sure this isn't caused by the conversions between WF and Ogre coord space?
If so, it might very well be that it's not possible to change without patching the Caelum code in the way you've already done.

Changed in ember:
assignee: nobody → atorkhov
Revision history for this message
Alexey Torkhov (atorkhov) wrote :

Ah, yeah, right, we have
        Ogre.z = -Atlas.y
Atlas.y is North, so our Ogre.z is South and Caelum's Z is North, so we need to flip it as I did.

Revision history for this message
Erik Ogenvik (erik-ogenvik) wrote :

Alright, I'll mark this as fixed then. We just need to remember to retain this fix whenever we update our Caelum code.

Changed in ember:
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Alexey Torkhov (atorkhov) wrote :

Though fix was made by change in Caelum's code, they suggested to rotate root node:
http://www.ogre3d.org/addonforums/viewtopic.php?f=21&t=8980

Changed in ember:
status: Fix Committed → In Progress
tags: added: caelum
Revision history for this message
Erik Ogenvik (erik-ogenvik) wrote :

What's the status of this?

Revision history for this message
Alexey Torkhov (atorkhov) wrote :

The status is that workaround fix is committed to our Caelum’s copy (at least was, if it wasn’t upgraded) but “normal” fix that doesn’t require patching the Caelum’s core should be done, which I’m going to do someday.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.