Calculating the static box that is only done once may be wrong if parent matrixWorld wasn't up to date. Calling el.object3D.updateWorldMatrix(true, false); before setFromObject fixes the issue.
Please note that el.object3D.updateWorldMatrix(false, false); is executed for the a-sphere and children already in the setFromObject function.
For example if you put a a-sphere as a child of a a-entity:
Calculating the static box that is only done once may be wrong if parent
matrixWorld
wasn't up to date. Callingel.object3D.updateWorldMatrix(true, false);
beforesetFromObject
fixes the issue. Please note thatel.object3D.updateWorldMatrix(false, false);
is executed for the a-sphere and children already in thesetFromObject
function.For example if you put a a-sphere as a child of a a-entity:
Without the fix, box.max will be 1 1 1. With the fix it will be properly of 4 1 1.