#1
|
|||
|
|||
Loading OSG models and orientation
Hello,
I have a question about orientation and loading OpenSceneGraph models. It seems that the OSGExp that can be downloaded from the worldviz site exports the model rotated and calls the root of the scene __VIZARD_NODE__. When loading the model, it will show correctly in vizard, but as soon as you rename this Root node, it will load the model rotated. I think this mechanism is used by Vizard to detect how the model is rotated. If it does not contain the __VIZARD_NODE__ root, it will applies a modifier so it is orientated correctly for use in Vizard. I already have a lot of models exported with another exporter. When you just load up the model it works fine, but when you change the parent of child objects, the orientation goes wrong. Here is some example code: Code:
scene = viz.add('data/testscene.ive') target = scene.getChild('Test1') target.parent(target.getParents()[0]) It this behavior a bug? Is there a workaround (without exporting all the models again)? Greetings, Joran. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Collision detection with specific models | just alex | Vizard | 1 | 02-06-2009 11:02 AM |