Reputation: 79
I use THREE.OBJLoader for import model obj I use code from https://github.com/mrdoob/three.js/blob/master/examples/webgl_loader_obj.html#L75 But I have problem when i need to rotate model that not rotate around itscenter. if i need it rotate around its center. How can I do?
Upvotes: 2
Views: 1370
Reputation: 104763
You can call
THREE.GeometryUtils.center( geometry );
This will translate the geometry so that it's bounding box is centered at the origin in the object's local coordinate system. Now, when you rotate it, it will rotate around it's "center".
Upvotes: 1