How to set the center of mass of a mesh?

Hello :slight_smile:

I would like to know how to set the center of mass position in a mesh.
Maybe I do not really need it, I have to do so to make the mesh move according to forces applied at different points of the mesh. I am worried that it uses the center of mass as the rotation axis.

I do not use static meshes, these are procedually generated from an image.

thanks for your help.

Hi Wicpar,

There is no simple way to change center of mass (CoM) at runtime. Also changing CoM at runtime can lead to unrealistic behavior.
If you want to apply force to CoM (to avoid object rotation), try to use AddForce function.

Hope it helps!

Thanks, but actually ue4 doesnā€™t fit my needs for 2d game developping. It has bad support for procedural meshes, composite material objects and external file loading. There is still alot to improve. Thanks for your help any way :slight_smile: I switcged 2 days ago to libgdx, in one day Iā€™v done 50% of what I did in ue4 in 3 weeks, because of its fixed pipelines, that can be changed in the engine code, but it is too long to understand the way it works. I may come back to make my 3D game, but there is really not enough flexibility. By changing the center of mass I wanted to simulate the one of an uneven object.