Hey there,
Im working on getting my object mouting the way I need it and ran across the case where I want to add in a local offset to the position returned from the skeletal point.
For example:
Here is the code from the skeletal point tutorial I am basing my work on:
Code:
OrientP &hand_r=cskel.getPoint("HandR");
Matrix m;
m.setPosDir(hand_r.pos,hand_r.perp,hand_r.dir) // set position and directions according to skeleton point
.scaleOrn(0.7); // scale down the matrix orientation a little, making the item smaller
Meshs("../data/obj/item/weapon/blunt/club/0.mesh")->draw(m); // render item with matrix
In my case: A sword moounted to the hand point renders just a bit outside of the hand...
Now I can go back to the mesh and move it a bit and it'll line up...
But what I want to be able to do is something like:
hand_r.pos += Vec(0.5,0,0); // nudge it a bit on the local x axis
How can I do this? ( its probably right in front of my eyes...)
Thanks!