Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulletIntegration: improve MotionState documentation #35

Closed
wants to merge 1 commit into from

Conversation

xqms
Copy link
Contributor

@xqms xqms commented Jan 8, 2019

The documentation gives the impression that SceneGraph changes are automatically propagated to the Bullet world - this is not the case. The SceneGraph transforms are only used for initialization.

Reference: https://github.com/bulletphysics/bullet3/blob/c993175a5859e48783cf2c490947d826be5649b2/src/BulletDynamics/Dynamics/btRigidBody.cpp#L67
(try searching the file for other occurences of MotionState::getWorldTransform() - the only other occurrence is for kinematic objects)

This modifies the documentation accordingly and adds a snippet on how to manually sync SceneGraph -> Bullet.

The documentation gives the impression that SceneGraph changes are
automatically propagated to the Bullet world - this is not the case.
The SceneGraph transforms are only used for initialization.

This modifies the documentation accordingly and adds a snippet on how
to manually sync SceneGraph -> Bullet.
@mosra
Copy link
Owner

mosra commented Jan 9, 2019

Thanks! Yeah, this was my (wrong) impression too (and also the wrong answer whenever somebody asked).

Kinematic objects ... wouldn't it then make more sense to make given rigid body kinematic instead? I would assume changing transformations for non-kinematic objects in such an "underhanded" way might make Bullet upset. Or is there an use-case where one would want a to update position of a non-kinematic object?

So instead I would suggest that the users make the body kinematic if they need two-way updates.

@mosra mosra added this to the 2019.01 milestone Jan 9, 2019
@xqms
Copy link
Contributor Author

xqms commented Jan 9, 2019

My understanding of kinematic bodies is that they do not perform full dynamic simulation, i.e. bullet does not change their poses and assumes they are static. That would be a pretty severe constraint.

My use case is that I create a Scenegraph with a connected bullet world, and then initialize the poses. In that case a one-time manual sync is best.

@mosra
Copy link
Owner

mosra commented Jan 9, 2019

bullet does not change their poses and assumes they are static

Ah! Didn't know that, sorry. Yeah, then this makes sense. Found this on SO, too.

Merged in e92ba90 and I'm also mentioning the kinematic bodies there now, in case that would fit someone's use case. Hopefully the wording makes sense, I kinda fail at English today :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants