I am attempting to build a physics-based vehicle prototype/testbed. My current wheel model needs to know the wheel’s loading to calculate maximum grip, etc. It appears that there is no way to know how much force a Linear Position Drive on a physics constraint component is applying. Using “Get Constraint Force” returns the forces for the locked linear axes, but it completely ignores the forces applied by the linear position drive. Here are the steps to produce this effect.
- Make a new actor with 2 cubes with physics simulated on one of them.
- Move one cube some distance above the other, so the constraint can act as a spring between them.
- Add a constraint between the 2 cubes with all 6 degrees of freedom locked.
- OnTickEvent → Get Constraint Force → Print the resultant linear force vector.
- Observe the output, it should be mostly in the z direction and it should reflect the weight of whatever cube is being held up.
- Set the constraint’s Linear ZMotion to Free, and enable the Linear Position and Velocity drives with default settings.
- Observe the output, it will read zero on the Z axis, even though the constraint is clearly applying a force through the position drive.
If anyone has any ideas or workarounds for discovering the force applied by the position drive, I would be incredibly grateful.