Some Havok Joint Questions

So Im trying to do a custom ragdoll solution for a demo. Im getting a couple problems though.

For one the aggregates are not matching the bounding mesh and I cant seem to get the connections to work as intended.

One other thing that I’m not really understanding is how to make the connections be in the right spot, but Ill be able to resolve that once the aggregates are in the right spot/size.

Tried to use the built in ragdoll solution but that was not even binding close to the correct place for the aggerates so I decided to link into my limb explosion and giblet system to just use those collider meshes.

cc @Cedric

Because of the extra transform, at the time, the built-in ragdoll only supported right handed scene.
That’s something I’d like to revisit in the future. Until then, scene should be easier to debug/test with right hand coordinate.

The code to offset the aggregate with the bone is here :

EDIT: I’m working on this : Physics Constraints debug viewer by CedricGuillemet · Pull Request #15960 · BabylonJS/Babylon.js · GitHub It should be more featured this week. Keep an eye on it.

1 Like

I’m also wondering why my bodies do not match the size of the mesh they where created with.

This is with all the colliders spawning, I really have no problem mapping the colliders and creating the joints, but having some way to visualize them without guessing and spawning meshes that “approximate” the joint positions is not doing it lol.

Also I know you are a wizard, but if you take a look at how I built the skeleton render for BJS the “Spurs and balls” solution decodes the skeleton data and is able to build the meshes regardless of handiness. That might be worth taking a peep at for when you do your updates. All the logic for handling dynamic skeletons is pretty much figured out there. That is how I built my boxes was using that same kind of analysis logic.

Its odd that the body visualizer does match the mesh they are bound to as well.

Very interested in your implementation of constraint visualization. I’ve attempted it and am still stuck on 6DoF edge cases. Especially 3 angles unlocked and angle constraints greater than 180 degrees.

I actually don’t remember if angle constraints with max - min greater than 180 degrees is possible with Havok.

I tried visualization with spherical wedges, but that is not quite right in the general case. I think the answer lies in “swept volumes,” but not sure if I’m overlooking something.

My visualization of linear constraint limits was a box fixed to the parent that contains the child pivot point.


This is where Im going to stop on this for now because what the collider and joints are doing makes zero sense…

Im placing meshes where I would assume the connection points are and have cylinders representing the angle I want them to pivot on for hinge and for ball I have the spheres for the connection points.

I just must not be getting them into “real” positions, because the second I turn mass on with the colliders that have joint connections everything freaks out.

Granted the joint visualizations are not moving, but I really must not understand how its actually binding them. I thought it was relative to the bone but I guess not?

Line 719 is where Im building the joints, but I really feel like Im placing them in the wrong places and they are not where Im visualizing them.

It’ll take a look in the coming days. PR for constraint vis is almost done.

2 Likes