threejs交流群511163089
sphere.applyMatrix4( object.matrixWorld );
判断与圆相交就是看到圆心距离是不是小于等于半径。
这中间发生了一些事情,圆心变过去了,但是半径喃。
sphere.radius*matrix.getMaxScaleOnAxis这个东西
getMaxScaleOnAxis: function () {
var te = this.elements;
var scaleXSq = te[ 0 ] * te[ 0 ] + te[ 1 ] * te[ 1 ] + te[ 2 ] * te[ 2 ];
var scaleYSq = te[ 4 ] * te[ 4 ] + te[ 5 ] * te[ 5 ] + te[ 6 ] * te[ 6 ];
var scaleZSq = te[ 8 ] * te[ 8 ] + te[ 9 ] * te[ 9 ] + te[ 10 ] * te[ 10 ];
return Math.sqrt( Math.max( scaleXSq, scaleYSq, scaleZSq ) );
}
这个东西。。感觉是初始 例如x轴 是1 0 0变换后就是x方向的缩放 同理 y z也是 然后拿到最大那个 乘给半径