Why setRotation/setPosition takes effect 1 loop late?
Posted: Wed Mar 15, 2006 7:03 pm
I've been using Irrlicht for a while and I've found something that I'm not sure whether it's a bug in the engine or it's done on purpose and I'm missing something. Sorry if that's an old issue.
Let's put this example of the engine loop:
Let's suppose that <someCondition> it's true and the node gets a new rotation. Well, I've noticed that the node DOESN'T show it's new rotation the next time the program gets to the drawing block (beginScene & endScene) BUT the second time the node it's drawn on screen.
It happens with setPosition too: The new position isn't taken into account (at least, when drawing the node) until the second loop is executed. Even when using animators there's that problem (the animation starts and ends 1 loop late). This ¿bug? is better noticed in a slow computer, since fps are much lower.
Does anyone know anything about that?
Thanks a lot!![Smile :)](./images/smilies/icon_smile.gif)
Let's put this example of the engine loop:
Code: Select all
while(device->run()){
driver->beginScene(...);
<<drawing stuff>>
driver->endScene();
if(someCondition)
node->setRotation();
}
It happens with setPosition too: The new position isn't taken into account (at least, when drawing the node) until the second loop is executed. Even when using animators there's that problem (the animation starts and ends 1 loop late). This ¿bug? is better noticed in a slow computer, since fps are much lower.
Does anyone know anything about that?
Thanks a lot!
![Smile :)](./images/smilies/icon_smile.gif)