WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   getPosition() not displaying the correct position (https://forum.worldviz.com/showthread.php?t=6070)

Tooba 10-14-2017 11:32 AM

getPosition() not displaying the correct position
 
Hello,

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?

Jeff 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 tutorial files. This worked fine. Can you post example code that replicates the issue for you?


All times are GMT -7. The time now is 06:45 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC