Skip to content

Do not destroy bodyTransform#46

Merged
diarmidmackenzie merged 1 commit into
c-frame:masterfrom
Elettrotecnica:don-t-destroy-constraint-body-transform
Oct 11, 2023
Merged

Do not destroy bodyTransform#46
diarmidmackenzie merged 1 commit into
c-frame:masterfrom
Elettrotecnica:don-t-destroy-constraint-body-transform

Conversation

@Elettrotecnica
Copy link
Copy Markdown

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

I also attach a toy example where I continuously toggle a constraint between an object and the camera and a screenshot of the error.

Error Screenshot
toy-example.zip

…ned 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
@diarmidmackenzie
Copy link
Copy Markdown
Member

Yes, agreed. Thank you for the fix.

@diarmidmackenzie diarmidmackenzie merged commit b2b2e02 into c-frame:master Oct 11, 2023
@Elettrotecnica Elettrotecnica deleted the don-t-destroy-constraint-body-transform branch December 28, 2023 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants