Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions fission/src/mirabuf/MirabufSceneObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,9 @@ class MirabufSceneObject extends SceneObject implements ContextSupplier {
}

public LoadFocusTransform(mat: THREE.Matrix4) {
const com = World.PhysicsSystem.GetBody(
this._mechanism.nodeToBody.get(this.rootNodeId)!
).GetCenterOfMassTransform()
mat.copy(JoltMat44_ThreeMatrix4(com))
const bounds = this.ComputeBoundingBox()
const center = bounds.getCenter(new THREE.Vector3())
mat.makeTranslation(center.x, center.y, center.z)
}

public getSupplierData(): ContextData {
Expand Down
Loading