3D_Gostek Posted September 3, 2022 Share Posted September 3, 2022 Hey Guys, please help me to understand what's going on. I have a project with 7 cubes with rigid bodies, 1kg mass, and they have different LDamping so they fall at different speed. Six of them have also a C++ component to rotate them. The cube without the component falls always at the same speed. But the cubes that rotate, for some reason, fall with different speeds depending how often I use setRotation() in the Update() method of the component. Please see the video attached. Is update method not good place to rotate the object cyclically? Thanks Gravity and setRotation.mp4 Gravity and setRotation.mp4 Link to comment
tarragrum Posted September 5, 2022 Share Posted September 5, 2022 Hello! If you use body don't set nodes transform directly. Use setPreserveTransform in update method. You can use BodyRigid methods in updatePhysics like addAngularImpulse etc Link to comment
3D_Gostek Posted September 11, 2022 Author Share Posted September 11, 2022 Hi tarragrum, mega thanks for the help! Checked both methods and it works. Link to comment
Recommended Posts