mrdoob/three.js — Issue #792: updating mesh matrix in webgl_materials_video.html example
Author: GMTurbo
Created: 2011-11-24 03:31:26+00:00
State: open

i have a function i took from one of these three.js post to map a physics engine (JigLibJS) to a mesh object:

function JL2THREE(target, pos, dir) {
var position = new THREE.Matrix4();
position.setTranslation(pos[0], pos[1], pos[2])
var rotate = new THREE.Matrix4(dir[0], dir[1], dir[2], dir[3], dir[4], dir[5], dir[6], dir[7], dir[8], dir[9], dir[10], dir[11], dir[12], dir[13], dir[14], dir[15]);
position.multiplySelf(rotate);
target.matrix = position;
target.updateMatrix();
target.matrixWorldNeedsUpdate = true;
}

when I use this function in the video.html example, it doesn't seem to change anything.

I setup all the meshes with .matrixAutoUpdate = false flag but still nothing work.

If i adjust the mesh's position however, it works. So, mesh.position.set(pos[0],pos[1],pos[2]) works, but the above code doesn't.

Am I missing something?