0 votes

I am trying to rotate two rigidbodies together. What's the correct way?

enter image description here

in Engine by (17 points)

what's the purpose of rotating them ?
do u want them to stop at hit .. both or just one ?
got any real life example (to make it simpler)?

This is my character actually. The plan is to make bouncing ball game, but not with just one ball. With two. And these are rotating around center position :)

How about making this a single RigidBody with either a single mesh consisting of two balls or two ball meshes. Plus two collision shapes. You can make it rotate via the add_torque method.

It will get more complicated if you actually want two separate rigid bodies. In that case you would use one or more rigidbodies between the balls which are joined with joints. (Emulating some kind of rope/chain).

A completely other way would be to do physics on your own and use kineticbodies instead.

1 Answer

+1 vote

You don't need to create (2 separate rigid bodies) to achieve this, you can do the following

  • use one rigid body with 2 collision shapes :
    > Shape 1 ---- Rigid Body ---- Shape 2

then to rotate the rigid body , you just need to apply torque , or mess with the angular velocity of the Rigid body


by (298 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.