WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   child-objects in VRML-file all have the same coordinates (https://forum.worldviz.com/showthread.php?t=2772)

Sven 06-07-2010 09:00 AM

child-objects in VRML-file all have the same coordinates
 
Hi,

I generated a simple maze using Blender, consisting of the actual maze and two additional smaller objects, which are attached to the maze's wall.
In Vizard, I can import this maze as a wrl-file without any problems, also extracting the two additional objects via getChild worked. I can manipulate the child-objects scaling, the rotation, color, all ok. However, when I query the objects' coordinates via getPosition, both the parent (maze) and the children (additional objects) have the same coordinates, namely (0,0,0). Querying the position with with ABS_GLOBAL also didn't help.

Could someone please help me out here?

Jeff 06-07-2010 11:01 AM

Make sure you get a handle to the lowest level transform before you call getPosition with the viz.ABS_GLOBAL flag. This article shows how to do this using an OSG model. The idea is the same with your VRML model, however it won't be using the GEODE naming convention.

Sven 06-08-2010 02:21 AM

Hi,

thanks for your answer! However, I think I did the steps shown in the article (those that also should apply for wrl files), and still I only get (0,0,0) for parent and children.
Concerning getting the lowest level transform: according to the properties of the wrl file as shown in Vizard, my handle indeed aims at the lowest level featuring the gear symbol. Further down, only cube- and grid symbols are shown.

This is how I tried to do it:

Code:

track=viz.add('inftytex.wrl')
cue1=track.getChild('OB_cue_card_1_0_0')
cue2=track.getChild('OB_cue_card_2_0_0')
cuePos1=cue1.getPosition(viz.ABS_GLOBAL)


Jeff 06-08-2010 11:51 AM

Are you saying that the purple cube object has no name associated with it?

Sven 06-09-2010 02:07 AM

1 Attachment(s)
Yes, that is correct. I'll attach the complete properties window:


All times are GMT -7. The time now is 03:27 PM.

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