I am encountering some challenges when it comes to manipulating the objects imported from Blender. It seems like the pivot point is always set at 0,0,0 instead of the current position of the object. Despite correctly positioning and importing the objects in the Blender scene, I face difficulties when trying to rotate them.
To further investigate, I have utilized BoundingBoxHelper. However, the bounding box does not appear surrounding the object as expected; instead, it is centered in the world with a default size of 1 unit.
Below is the code snippet used to load the alien model:
texture6 = THREE.ImageUtils.loadTexture('images/alien1.png', {}, function() {
renderer.render(scene, camera);
});
loader = new THREE.JSONLoader();
loader.load( "models/alien1.js", function( geometry ) {
geometry.computeFaceNormals();
geometry.computeCentroids();
geometry.computeBoundingBox();
var mat = new THREE.MeshBasicMaterial({map: texture6,transparent: true, color:0x00FF00} );
var mesh = new THREE.Mesh( geometry, mat );
scene.add(mesh);
bbHelper = new THREE.BoundingBoxHelper( mesh, 0xff0000 );
scene.add( bbHelper );
});
Observing the outcome: (The red bounding box should encapsulate the green alien but appears in the center of the scene)
Do you have any suggestions on how to address this issue?