255 wrote:zester wrote:Ohhh and Mr I know my stuff
With "I know my stuff" I just meant that I know that you can change the origin in Blender but I really needed to change it via code. I just meant that, sorry if it sounded snob. It was a way to say "yep I know you can change it Blender but I really need to do it via code".
zester wrote:The problem with your code is your trying to rotate an object from a pivot point that doesn't exist. I know you think you created it but you didn't.
Thanks for the input.
But I think that the pivot does exist.
I'll try to give more information.
What I'm trying to do is to create a complex ragdoll which loads a mesh as the bounding box for every part.
What I'm doing is this:
say you have a lower arm and two bones, elbow and wrist
create a ragdoll part
set its origin the same as the wrist bone
set the part position in the position the same as the wrist bone minus the elbow bone
set the pivot constraint = position of elbow bone
update the skeleton to match the rotation of the ragdoll part
start the physics context and enjoy how everything is working fine and the arm swings
but problem: if your ragdoll part mesh which is the lower arm is a bit rotated (in the mesh file), then your skeleton will rotate wrong. This is why I'm trying to add to its rotation an offset rotation.
Or I could rotate the mesh itself, but this seems way harder.
I mean your pivot exist just not ... never-mind doesn't matter.
You should have just said "Ragdoll, Code, Not Working, HELP" lol
I now see what your saying. Both solutions are incorrect thou, you wouldn't want to do ether. You do know that when you start messing with the pivot point your bounding box for each object modified is going to change its scale and transformation right?
Thats why I was say no no no no don't do that. Cause it will really mess with your physics. And then your ragdoll will really look bad.
Normally you wouldn't even use a ragdoll in a game, they exist for the purpose of recording a keyframed animation in your 3d package(blender) allowing you to simulate the physics of beating the crap out of a character to play back at a later time.
What you want doesn't have lua bindings yet "MArmature" and "MSkinData" I think "MSkinPoint * m_points;" is the Bone's Transformation Matrice. If so thats what you would be wanting to tweek I do believe.
How is your C++? I would say put in a request.
I am half tempted to just re-implement the lua bindings using luabind would only take a couple of hours to wrap maratis entire codebase.
Last edited by zester (2013-10-15 17:22:23)