How do I get the location

of a point in the local coordinate system relative to a TransformGroup?

Say I have a Tuple3f that represents the location of a light source in a scene. Now let’s assume I have a shape3D that’s located somewhere in a tree of TransformGroups, what I want to do is retrieve the light location in the shape’s local coordinate system.


     Light 
       o

TransformG1
        |
         \
          TransformG2
                  |
                   \
           TransformG3
                    |
                 Shape

Hi,

You have to inverse-transform it using your shape’s local-to-vworld transform (getLocalToVWorld()).

Yuri

.getLocalToVWorld().getCenter();

worked when i was doing that sort of thing :slight_smile: