View Full Version : getPosition() not displaying the correct position

10-14-2017, 11:32 AM

I created a 3D model in Sketchup, saved as .dae, opened in Vizard Inspector, named the objects, and saved it as .osgb, and loaded the model into my code in Vizard. Everything seems perfect, objects are loading correctly, but when I try to use getPosition(ABS_GLOBAL) on any object, it shows me the position [0,0,-0]. However if the object is grabbed and moved by the user, it shows the correct position (when I try to print it inside the event function).

I have tried getPosition() with other parameters as well, but nothing is working. I even tried getting the matrix which also shows the matrix with zeroes. What should I do to get the correct initial position of objects?

10-16-2017, 04:01 PM
I just tested getPosition with the ABS_GLOBAL flag on sub-parts of the model included with the sketchup to vizard (https://sites.google.com/worldviz.com/sketchup-workflow/home/sketchup-model) tutorial files. This worked fine. Can you post example code that replicates the issue for you?