In three.js. I have an object(called container)(cube size 2.75,0.40,3.25). If I add 4 smaller objects(called corners)(cubes size 0.25,0.05,0.25) to the corners of the container, how can I get the scene positions of the smaller object(the corners), not the positions that I used to put them in the container.
0
votes
I have figured out what I needed to know.
- Mike O
'var hitPntPos = new THREE.Vector3(); var hitPntQuat = new THREE.Quaternion(); var hitPntScale = new THREE.Vector3(); Vehicle.hitPoints[0].matrixWorld.decompose(hitPntPos, hitPntQuat , hitPntScale); //var hitPntRot = new THREE.Vector3(); //hitPntRot = rotation.setEulerFromQuaternion( hitPntQuat, eulerOrder ); alert('hitPoints[0] x,z ' + hitPntPos.x + ',' + hitPntPos.z);'
- Mike O