Changing orientation of a joint

So for a standing ragdoll you place pivotInA at the top of a leg and pivotInB at the bottom of the torso, and the leg goes forward and backwards the same amount

but what if your creating the joint with the ragdoll sitting so the leg is sticking out forwards
how would you create/modify a joint so its range is the same as if it was standing?

not sure if i would just rotate the leg and create the joint like its standing, and then rotate the leg forward like its a sitting position

currently using a conejoint

I’m pretty sure the angle domains would be the same standing versus sitting, because the domains are based of the model’s original pose, not the current pose.

using libbulletjme, not minie, as a FYI

so my ragdolls are kind of weird, they are being put together in that position already
i think technically its not even a “ragdoll” its just connected box shapes

my code is bad, but its functional :smiley:

hence wondering what the best kinda like… hotfix would be?
basically just wanna rotate a connection point 90 degrees without having to redo the logic everything shares

wasn’t sure if it would work if i just went…

if X:
rotate 90 degrees, add joint, rotate 90 degrees
else:
add joint

or id need to worry about its location relative to the rest of the ragdoll or not
or i could use a different type or joint to allow that
or if there was a way to just rotate one of the connection points after making it

I’ve kind of just looked at the documentation and been messing with things as i go

For starters, I highly suggest you switch to Minie. It is better maintained, has fewer bugs, and is a drop-in replacement for libbulletjme.

For ragdolling animated characters, you should definitely use DynamicAnimControl. It doesn’t sound like you are using it currently, but it has the ability that when you start the ragdoll, all the physics shapes assume the same transform as the limb they are controlling.

If you need further help, please post your code so I can look through it.

my bad, when i said i was using libbulletjme, its because im not using Jmonkeyengine
this is just the physics engine

its less… turning ragdoll physics on for a entity
and more turning the ingame enemy invisible on death and swapping it with a ragdoll
and pulling whatever information i can from the game to make the ragdoll interesting

the code may not be easy to understand as its not even proper java, its reflected by a DSL