Code: Select all
while ( trans_to_menu == true )
{
background->move( position2d<s32>(+10,0) );
}
Thanks.
Code: Select all
while ( trans_to_menu == true )
{
background->move( position2d<s32>(+10,0) );
}
It's not an Irrlicht related problem. Let me explain.3DModelerMan wrote:Code: Select all
background->move( position2d<s32>(+10,0) );
Code: Select all
position2d<s32> bgpos = background->getAbsolutePosition().UpperLeftCorner;
background->move( position2d<s32>(bgpos.X+10,bgpos.Y) );
Negative!nmn wrote:means that there's no way it's relative to your current position.
Code: Select all
00451 virtual void move(core::position2d<s32> absoluteMovement)
00452 {
00453 setRelativePosition(DesiredRect + absoluteMovement);
00454 }
This is more likely.CuteAlien wrote:The problem looks rather like an endless loop to me.
3DModelerMan wrote:Hi I have a setup that should scroll my splash screen to the right, but it does'nt, here's my code that should move the splash screencould someone tell me what I'm doing wrong?.Code: Select all
while ( trans_to_menu == true ) { background->move( position2d<s32>(+10,0) ); }
Thanks.
Code: Select all
x = 0;
while (x < 640)
{
x++;
}
.....
render()
Code: Select all
while (device->run())
{
if (something) dosomething();
if (somethingelse) dosomethingelse();
if ( background->getAbsolutePosition().LowerRightCorner.X < 1000 )
background->move(position2di<s32>(10,0));
driver->beginScene(...)
smgr->drawAll();
driver->endScene();
}
Code: Select all
while arrow key is down, move the character
Code: Select all
while (device->run())
Code: Select all
while (device->run())
{
if (MYFLAGFORLEFTKEYISDOWN)
mycharacter->moveleft();
draw stuff
}