I’m trying to get a certain kind of rope physics for my project using Havok. You can see in the playground I made a bunch of sphere shapes with ball & socket constraints between them. It looks pretty good if you are looking for thin, flexible rope or string, but I was hoping to get the feeling of a thick cable that doesn’t bend so much. Not sure if this is even the right approach though. I keep messing with angular and linear damping, altering the mass of various parts, and I can’t seem to get the effect I’m looking for.
Does anyone have ideas for how to make it look more like a stiff steel cable?
That’s a good idea. But I have been unable to make a 6DOF constraint that looks even remotely similar to a ball and socket constraint. Probably I misunderstand how to use 6DOF constraints. Any help? Playground here: https://playground.babylonjs.com/#XTCZ07#18
You have specified pivot points as a number (you need a vector3, as you did in the first example).
I copied the pivot points from your commented code and it worked great.
Obvious mistake, but it seems strange that there are no error messages
Well that’s embarrassing but I’m glad you caught that
So, back to the original question of how to make a less flexible rope. Adding the angular limits on the 6DOF constraint doesn’t seem to have much of an effect on the stiffness of the joints. When I put the limits down to [0, 0] it does act a bit stiffer but also kind of glitches out (see https://playground.babylonjs.com/#XTCZ07#20) (the rope segments don’t keep their ends together). I fully understand that the solver will never be perfect especially when there is a long chain of constraints, but I keep thinking there must be a way to get the effect I want.
This has a lot of potential! I will experiment with this in my project. Somehow I missed that part of the API – apparently my reading comprehension is low this week. Thank you and thanks to everyone else who offered ideas
edit: I see that setAxisFriction is only available in the 6DOF constraint. Is there any reason the other constraints (ball/socket, hinge, etc) couldn’t have a method for axis friction?