Search the Community
Showing results for tags 'torque'.
-
A fast rotating/rolling rigid body (sphere or cylinder) over a flat terrain bumps when moving. I've used a default LandscapeLayerMap, and have not edited it's shape, only size and position. I've added a C# component to the sphere/cylinder adding torque in one axis every frame at the UpdatePhysics() function. CS file is attached. My guess is that the terrain, even a flat one, uses a concave collision shape, and the rotating bodies bumps at the edges of internal triangles of the collision shape. I have this guess because the behaviour is the same over the default ground plane. But, if I add a BODY of type RIGID to the ground plane, set it to IMMOVABLE, and add a BOX as collision shape (a convex collision shape), the sphere or cylinder rotates smoothly, with no problems. I also have this guess because I've found the same bug in Godot Game Engine, which uses a port of Bullet physics engine: https://github.com/godotengine/godot/issues/50463 I've tested changing the following parameters in the SETTINGS > PHYSICS (each of one alone or combined), with no difference: Stable FPS Determinism Sync Engine Update Update Mode Budget Iterations Context of why I am testing this type of behaviour: I have a physics based, arcade like, racing game made with Godot, that does not use a raycast model. Instead, I've made a custom solution with joints attaching rigid body wheels to a rigid body vehicle body. The motors of the joints add torque to the wheels, making the vehicle move. But due to the bug described, I can't expand the game to large terrains. I'm experimenting with Unigine to port my game to Unigine, because the physics in general looks rock solid. I'll continue my tests, but have already found this problem. Additional comments: I can attach the SOURCE and DATA folder from my project. I have not done it already because these two folder together are 500 MB in size, and I don't know if it's worthy it. The cylinder begans to make weird movements after the first bumps. I guess that's because the ObjectBodyRigid.AddTorque() function adds torque to the global/world axis. But the effect is only visible because of the first bumps, caused by the terrain. In the sphere video, the PERSECUTOR camera has some random movements. But they only happen when recording the video (I use Movavi). When not recording, the camera follows the sphere smoothly with no random movements. UnigineRollingBall.mp4 UnigineRollingCylinder.mp4 Ball.cs
-
Hi, we have a vehicle model that will run scripts for engine torque, rpm, efficiency, etc. I calculate a torque value from car engine to geartrain and differentials, then apply the torque to the wheels, Unigine handles the physics beyond that point. I need to fetch the rolling resistance experienced by the wheel, so that I can take into consideration the negative torque feedback to the engine to use it as engine load. Is there a way I can "get" the current forces on the wheel? Cem. P.S.: I am using JointWheel by the way.