How to rotate a object on axis world three.js?

后端 未结 5 1388
深忆病人
深忆病人 2020-12-03 05:35

Is it possible to do rotations taking axis of the world and not of the object?

I need to do some rotations of an object, but after the first rotation, I can\'t do ot

5条回答
  •  眼角桃花
    2020-12-03 05:56

    Somewhere around r59 this gets a lot easier (rotate around x):

    bb.GraphicsEngine.prototype.calcRotation = function ( obj, rotationX)
    {
        var euler = new THREE.Euler( rotationX, 0, 0, 'XYZ' );
        obj.position.applyEuler(euler);
    }
    

提交回复
热议问题