Masterhawk wrote:You add 100 units to the Z-value every frame. With 75 fps you add 7500 every second. I think that it's a little too fast.
Try to reduce the pos.Z += 100; to somthing like "pos.Z += 1"
Eheheh sorry for the mistake the real code was:
Code: Select all
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
vector3df pos = camera->getPosition();
pos.Z += 100;
object->setPosition(pos);
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
It draw object at camera pos + 100Z, but the problem there is also with draw2DImage and many other stuff in while()
Also with this:
Code: Select all
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
core::position2d<s32> m = device->getCursorControl()->getPosition();
// Drawa il mirino
driver->draw2DImage(images, core::position2d<s32>(m.X+20,m.Y+20),core::rect<s32>(0,0,32,32),0,video::SColor(255,255,255,255), true);
driver->endScene();
}
The target is drawed very bad and slow