Get global position of Child vert

If I have a child object, oGeometry.getVertex() returns the local coordinates. Is there an easy way to return the global position instead? 

Comments

  • PraxisPraxis Posts: 254
    bradrg said:

    If I have a child object, oGeometry.getVertex() returns the local coordinates. Is there an easy way to return the global position instead? 

    This works for me:

    myNode.getObject().getCachedGeom().getVertex()

     

    From http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object_dz

    "getCachedGeom(): Re-evaluates the pipeline if necessary and returns the final world-space mesh for the current shape."

     

    But sometimes, after I've changed the Vertex's value via a Morph, it does not give the correct value unless I first execute myNode.update()

    I'm not sure when or why it is necessary to execute myNode.update() and/or myNode.finalize()

     

     

     

  • Thanks for the reply. I ended up inserting a null, moving it to that point and then getting the world space coordinates from that. You solution should be much cleaner. 

Sign In or Register to comment.