I’m attempting to set up a physics simulation using BulletRigidBodyNodes connected with BulletSliderConstraints in order to set up spring connections. I’ve been able to create this between two nodes and have been manually setting the HPR value for the connection TransformStates so they are aligned from one node to the other. In the case where they are not aligned the nodes snap into place. My goal has been trying to get this done based on the relative positions using Quaternions, but I haven’t been using either the TransformState.makeQuat() or the TransformState.makeHpr(quat.getHpr()). Ideally I want the sliders connected in the proper orientation rather than changing the orientation of the nodes, since I eventually want to connect multiple sliders between different nodes.
I’ve not got a ton of experience with Panda3d, so any help with creating a function to appropriately assign transformstates to the sliders would be greatly appreciated.
Here is the code I am using for this, lines ~310 - 351 githublink