Havok joints seem to be less rigid than Bullet and PhysX joints.
In the video below, a 6-DOF joint with all 6 axes locked is created in Havok, PhysX, and Bullet. A capsule player walks into the joint, and I thought that the fully-locked joint would block the player like a static wall. This is true for PhysX and Bullet, however the player is able to bend the Havok joint:
I’ve created a Playground for Havok with a fully-locked 6-DOF joint. After 2 seconds, a constant force is applied to the joint’s child body in the z-direction, which unexpectedly is able to bend the fully-locked joint:
I don’t know if it’s an option, but if you set the mass to 0, the motion type will be set to STATIC and the child object won’t move. You can also increase the mass, until the child stops moving (but it may not be an option either!).
Thank you, @Evgeni_Popov, I’ll look into increasing mass.
In the meantime, I wanted to share a video comparison of Bullet vs. PhysX vs Havok joint rigidity with Distance and Prismatic joints. My worry with increasing mass is that it will take more force to move joints with angular and distance limits.
In the video below, I like Bullet’s behavior where the joints move freely within the angular and linear limits and become very rigid once the limits are reached (without needing to increase mass) .
So far, when I try tweaking stiffness and damping, the joint only becomes softer. In the descriptions of the stiffness and damping functions (in the types .d.ts file), it says:
This will convert the axis from a hard limit to one which uses a spring model, parameterized on stiffness and damping
If the hard limit is already quite flexible, the stiffness and damping spring model seems like it makes it more flexible.
So far, this hasn’t worked for me either, though I can keep looking into this.
Ooh interesting find. I worry a bit about altering the pivots, as you mentioned below. Though, let me look into this more
Are we missing any constraint types? I’ve seen other references indicate the support for run-time removal of constraints usable as “breaking” a constraint.
Are we missing any control mechanisms to modify malleability of constraints?
Again, not sure if any of this applies to our current implementation of Havok Physics.
I think this might unfortunately be a case of “that’s just the way it is” - the constraint solver is a balance of performance, stiffness and stability. I do wish our fixed angular limits were stiffer in this kind of scenario where the arm of the force is very large, but there isn’t really much we can tweak here. If you want perfectly rigid attachments between objects, the best way to do that is by adding all the components to a compound shape - that will be a perfectly rigid attachment and will execute faster.
@HiGreg, I think this is a little off-topic, but the SDK you’ve linked to is a previous generation of our physics engine, which was distributed for a limited time in an arrangement with Intel many years ago. That SDK is not representative of what’s used in Babylon.