[osg-users] Absolute/world position
Johny Canes
psijsma at gmail.com
Mon Sep 24 04:25:36 PDT 2018
Hi,
I've been using the following snippet to get a final world position
Code:
n.getBound().center() * computeLocalToWorld(n.getParentalNodePaths()[0]));
This works correctly some of the time, e.g. for a shallow scene, or one that is freshly imported from an .obj loader, etc.
But things go awry when nesting Pats, and will returns 'doubly multiplicated' coordinates or otherwise just coords that make no sense to me.
Is there a real surefire way to get the absolute / world coordinates from a node / pat?
Alternatively, could I be doing something wrong? I have several pats and nodes inside of eachother, and maybe something is bad.
Thank you!
Cheers,
Johny
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74967#74967
More information about the osg-users
mailing list