About Store Forum Documentation Contact



Post Reply 
Kinematic rotation problem
Author Message
Grabonito Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
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
Find all posts by this user Quote this message in a reply
Grabonito Offline
Member

Post: #3
RE: Kinematic rotation problem
Thank you everything works as it should.
12-29-2010 02:24 PM
Find all posts by this user Quote this message in a reply
Post Reply