Saltar la navegación

7 setPositionAngle

//create items

var picture_1 = Scene.getItem('');

var picture_2 = Scene.getItem('');

var picture_3 = Scene.getItem('');

//position items

picture_1.setPosition(0,4,0);

picture_2.setPosition(-3,4,0);

picture_3.setPosition(3,4,0);

//change code setPosition vs. SetPositionAngle;

picture_1.setPositionAngle(0, 4, 0, 0, 0, 1, Math.PI / 1);

//rotate second item axis Y

picture_2.setPositionAngle(-3, 4, 0, 0, 0, 1, Math.PI / 1);

//rotate third item axis Z

picture_3.setPositionAngle(3, 4, 0, 0, 0, 1, Math.PI / 1);

//rotate first item axis X

picture_1.setPositionAngle(0, 4, 0, 1, 0, 0, Math.PI / 3);

//rotate second item axis Y

picture_2.setPositionAngle(-3, 4, 0, 0, 1, 0, Math.PI / 4);

//rotate third item axis Z

picture_3.setPositionAngle(3, 4, 0, 0, 0, 1, Math.PI / 5);

//degrees 4 = 45º 3 = 60º 5 = 36º

var picture_1 = Scene.getItem('UtbQw8hI5S');

var picture_2 = Scene.getItem('nvcvQd5nz1');

var picture_3 = Scene.getItem('YBmSin5GfG');

//picture_1.setPosition(0,4,0);

//picture_2.setPosition(-3,4,0);

//picture_3.setPosition(3,4,0);

//rotate first item axis X

picture_1.setPositionAngle(0, 4, 0, 1, 0, 0, Math.PI / 3);

//rotate second item axis Y

picture_2.setPositionAngle(-3, 4, 0, 0, 1, 0, Math.PI / 4);

//rotate third item axis Z

picture_3.setPositionAngle(3, 4, 0, 0, 0, 1, Math.PI / 5);

//degrees 4 = 45º 3 = 60º 5 = 36º