mrdoob/three.js — Issue #1208: Assigning custom matrix to a mesh
Author: mmmovania
Created: 2012-01-28 19:55:16+00:00
State: open

Hi all,
I am trying to assign a custom matrix to my mesh. My mesh's transform is this,

var xform = new THREE.Matrix4();
xform.identity();
xform.setTranslation(0,2,0);
xform.setRotationX(45*D2R);
xform.setScale(1,1,0.5);

and the mesh is defined as a simple sphere
var sph = new THREE.Mesh(sm, new THREE.MeshNormalMaterial());

now if i assign the transform to the mesh like this

sph.matrixWorld = xform;
scene.add(sph);

The sphere remains at origin.

Any ideas why it does not transform?