Skip to content

Commit f51aec9

Browse files
Do not destroy bodyTransform, as this is in fact the btTranform returned by .getCenterOfMassTransform, that is, protected member m_worldTransform of the btCollisionObject class and not an object instantiated locally
Deleting this object will eventually lead to an out of bound access error that will prevent any further constraint See https://pybullet.org/Bullet/BulletFull/classbtRigidBody.html#a5eaee89e89e7498cfb39709e58fdc477
1 parent ea1630d commit f51aec9

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/components/ammo-constraint.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ module.exports = AFRAME.registerComponent("ammo-constraint", {
166166
throw new Error("[constraint] Unexpected type: " + data.type);
167167
}
168168

169-
Ammo.destroy(bodyTransform);
170169
Ammo.destroy(targetTransform);
171170

172171
return constraint;

0 commit comments

Comments
 (0)