Grabonito
Member
|
Kinematic rotation problem
Hi
Feature only works properly
Code:
if(Kb.b(KB_O))kinematicMoveTo(actor.pos()+Vec(0,5,0)*Time.d());
Why can not I rotate an object. Where is the error ?
All of the code:
Code:
struct Siekiera: Game::Kinematic
{
virtual Bool update()
{
if(Kb.b(KB_O))kinematicMoveTo(actor.pos()+Vec(0,5,0)*Time.d());
Matrix m ;
m.rotateYVec(30);
if(Kb.b(KB_L))m.move(Vec(3,30,0)*Time.d());
SetMatrix(m);
return __super::update();
}
};
|
|
12-29-2010 11:23 AM |
|
Esenthel
Administrator
|
RE: Kinematic rotation problem
kinematicMoveTo(actor.pos()+Vec(0,5,0)*Time.d());
because you modify only the position here
Matrix m=matrix();
m.rotateY
kinematicmoveto(m)
|
|
12-29-2010 02:08 PM |
|
Grabonito
Member
|
RE: Kinematic rotation problem
Thank you everything works as it should.
|
|
12-29-2010 02:24 PM |
|