Center of mass of RigidBody3D for throwing a pilum

Godot version 4.2.1

Hello,
My character is throwing a pilum (RigidBody3D) with the apply_impulse() function.
I would like the pilum to rotate because its heavier at the front, but it remains parallel to the ground. I tried to define a custom center of mass along the throw axis but that does nothing. Do you know why changing that center of mass has no effect ?

Because moving the center of mass only affects objects that are either already rotating or interacting with outside forces. Think about it. Godot starts as the void of outer space. If you throw something in space with no initial rotation, no matter what the shape or weight distribution is, it’s not gonna spin on its own, even if there’s gravity. All things fall at the same rate no matter their mass. Remember the feather in void experiment.
The pilum rotates in real life because it is traveling in air. The air is what makes the back fall different. That’s why arrows have feathers.
You need to somehow simulate friction. The easiest, cheaty way would be to attach another rigidbody to the back of the pilum with a pin joint just to give it linear velocity dampening. This is a very gamey solution, but it’s quick and easy. A better solution would be to actually simulate air friction. Even I am not sure how to best do that tho lol.

1 Like

I thought that air friction was simulated somehow. Thank you.

In the end I set the body basis using look_at and its linear velocity while the body is flying, it works well enough for me.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.