Three.js: VRML importer does not respect object positions.

Created on 28 Aug 2018  路  5Comments  路  Source: mrdoob/three.js

When using the VRML importer, any objects that does not have their pivot in the center of the scene are moved to the center of the scene.

Three.js version

r94

Browser
  • [x] All of them
OS
  • [x] All of them
Loaders

Most helpful comment

Yes, it seems that this was an issue in my code, that had to do with detaching the object from its parent before the scene graph world matrices had been calculated.

All 5 comments

Can you please share a VRML file that reproduces the mentioned behavior? The official example seems to work well. At least the following code section does read the position data correctly from the respective VRML file:

https://github.com/mrdoob/three.js/blob/cbe8e563d062918d85533dbe3a033af5192501aa/examples/js/loaders/VRMLLoader.js#L690-L696

When importing this file:
test.wrl.zip

This is how I expect it to be:
screen shot 2018-08-31 at 08 48 23

This is what I get:
screen shot 2018-08-31 at 08 48 30

This may be a problem with my own code after all.
I will dive a bit deeper, and if this is indeed the case I will close this issue with an apology.

I will dive a bit deeper, and if this is indeed the case I will close this issue with an apology.

No problem. I've loaded the file in webgl_loader_vrml and see this:

image

Yes, it seems that this was an issue in my code, that had to do with detaching the object from its parent before the scene graph world matrices had been calculated.

Was this page helpful?
0 / 5 - 0 ratings