I have issue when use TransformControls.
In mode rotate, i want to rotate object 360 degrees. Code below:
else if (axis === "X" axis === "Y" axis === "Z") {
this.rotationAxis.copy(_unit[axis]);
this.rotationAngle = this.pointEnd.angleTo(this.pointStart);
this._startNorm.copy(this.pointStart).normalize();
this._endNorm.copy(this.pointEnd).normalize();
this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1;
}
It doesn’t work properly when I change the camera direction. The object’s rotation direction is opposite to the direction of my mouse pointer.
Pls help! Thanks