Hello,
it seems to work fine with op.base(EE::UIDZero);
I'm able to spawn my character.
I just have 1 question and 1 issue (probably can be solved together).
Question:
How can I rotate my character?
Issue:
Whenever I call this
Code:
m_skel.updateBegin(); // begin update
m_skel.clear(); // clear skeleton animation
m_skel.animate(m_uidAnimation, Time.time()); // animate animation and current time position
m_skel.updateMatrix(); // update skeleton animation matrixes
m_skel.updateEnd(); // end update
then the character is no longer visible (I guess his pos changes)
Update:
I fixed the issue by changing
Code:
m_skel.updateMatrix(); // update skeleton animation matrixes
to this
Code:
m_skel.updateMatrix(Matrix()); // update skeleton animation matrixes
Is this good or bad?
Also any idea how to rotate the character? I tried
Code:
Matrix m = T.matrix();
m.orn().rotateY(60);
m.setPos(pos());
m_skel.updateMatrix(m);
but this doesn't change anything
I noticed the following:
if I call it like this
Code:
m.orn().rotateY(60);
m.setPos(pos());
m_skel.updateMatrix(m);
then rotateY does not work.
but if I call it like this,
Code:
m.setPos(pos());
m.orn().rotateY(60);
m_skel.updateMatrix(m);
then it works..
However, my solution now is:
Code:
Matrix m = T.matrix();
OrientP orn(m.pos, m.z, m.y); // convert matrix to positioned orientation
orn.rotateY(DegToRad(270));
orn.fix(); // normalize and realign
T.matrix(Matrix(orn)); // set matrix from positioned orientation