About Store Forum Documentation Contact



Post Reply 
Resolved] Rotate->Kinematic
Author Message
Grabonito Offline
Member

Post: #1
Resolved] Rotate->Kinematic
What's the problem, the rotor is not rotating.

Code:
struct Rotor: Game::Kinematic
    {

   virtual Bool update();

    };
/********************************************/
Bool Rotor::update()
    {
    Matrix m=matrix();
    m.rotateYVec(1*Time.d());
    
    return __super::update();
      
   };
/******************************************/
(This post was last modified: 10-23-2011 07:02 PM by Grabonito.)
10-23-2011 10:18 AM
Find all posts by this user Quote this message in a reply
Fab4 Offline
Member

Post: #2
RE: Rotate->Kinematic
I am not sure about this but:
Time.d() is just the time of the last frame,
try to replace it with
Time.time()
(This post was last modified: 10-23-2011 01:25 PM by Fab4.)
10-23-2011 01:24 PM
Find all posts by this user Quote this message in a reply
Grabonito Offline
Member

Post: #3
RE: Rotate->Kinematic
I checked earlier does not work.
10-23-2011 01:34 PM
Find all posts by this user Quote this message in a reply
Grabonito Offline
Member

Post: #4
RE: Rotate->Kinematic
Correct code, I forgot it all about moving pfft

Code:
Bool Rotor::update()
    {
        Matrix m=matrix();
        m.rotateYVec(0.6*Time.d());
        kinematicMoveTo(m);
    
            return __super::update();
      
   };
/******************************************/
(This post was last modified: 10-23-2011 07:04 PM by Grabonito.)
10-23-2011 07:01 PM
Find all posts by this user Quote this message in a reply
Post Reply