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

RigidBody center of mass with Bullet/GodotPhysics #1711

Closed
HugoSlt opened this issue Aug 28, 2018 · 1 comment · Fixed by godotengine/godot#41563
Closed

RigidBody center of mass with Bullet/GodotPhysics #1711

HugoSlt opened this issue Aug 28, 2018 · 1 comment · Fixed by godotengine/godot#41563

Comments

@HugoSlt
Copy link

HugoSlt commented Aug 28, 2018

As discussed in this issue, it's not obvious what the center of mass of a RigidBody is, especially since Bullet and GodotPhysics have different conventions.

We should add a note in the docs that mentions :

  • GodotPhysics defines the center of mass as the average of the collisionShapes centers
  • Bullet defines the center of mass as the RigidBody center
  • Thus with Bullet we can manually set the center of mass where we want by adjusting the relative positions of the RigidBody and its children
  • Optionally, maybe also add a note on how to compute the center of mass of a complex imported mesh. If Godot doesn't have a built-in function, then maybe we could just mention that Blender has the "Origin to Center of Mass (Surface)" and "Origin to Center of Mass (Volume)" functions with shift + ctrl + alt + c ("Set Origin")
@pwab
Copy link

pwab commented Sep 11, 2018

What an interesting observation! This could explain some headaches I got while I've worked with RigidBodies and Joints.

Just a quick sidenode:
The information that GodotPhysics defines the center of mass as the average of the collisionShapes centers could also be added to the RigidBody2d docs. This could be mentioned when documenting these functions:

  • add_central_force
  • apply_central_impulse
  • add_torque
  • apply_torque_impulse

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

Successfully merging a pull request may close this issue.

3 participants