You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
world.onenter=()=>{constscene=world.environment;constboxNode=world.createNode({mesh: world.createBoxMesh({size: [1,1,1],segments: [1,1,1],material: world.createMaterial({baseColorFactor: [1,1,1,1],}),}),collider: world.createCollider({type: "box",size: [1,1,1]}),});boxNode.addPhysicsBody({type: WebSG.PhysicsBodyType.Kinematic});// cause the script to error out before the node is added to the scene boxNode.notAFunction();scene.addNode(boxNode);};
By causing the script to error out before the node is added to the scene, a detached physics body is created that never gets disposed of, even when switching worlds.
The text was updated successfully, but these errors were encountered:
reproducing script:
By causing the script to error out before the node is added to the scene, a detached physics body is created that never gets disposed of, even when switching worlds.
The text was updated successfully, but these errors were encountered: