We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff0ad7d + 1077afb commit 1737745Copy full SHA for 1737745
fission/src/mirabuf/MirabufSceneObject.ts
@@ -541,10 +541,9 @@ class MirabufSceneObject extends SceneObject implements ContextSupplier {
541
}
542
543
public LoadFocusTransform(mat: THREE.Matrix4) {
544
- const com = World.PhysicsSystem.GetBody(
545
- this._mechanism.nodeToBody.get(this.rootNodeId)!
546
- ).GetCenterOfMassTransform()
547
- mat.copy(JoltMat44_ThreeMatrix4(com))
+ const bounds = this.ComputeBoundingBox()
+ const center = bounds.getCenter(new THREE.Vector3())
+ mat.makeTranslation(center.x, center.y, center.z)
548
549
550
public getSupplierData(): ContextData {
0 commit comments