Grabonito
Member
|
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 |
|
Fab4
Member
|
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 |
|
Grabonito
Member
|
RE: Rotate->Kinematic
I checked earlier does not work.
|
|
10-23-2011 01:34 PM |
|
Grabonito
Member
|
RE: Rotate->Kinematic
Correct code, I forgot it all about moving
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 |
|