Hello, a quick newbie question:
I have an overhead RTS-like camera, want to move it, so i move the camera itself and the cameras target by the same amount,
but still it kind of, well, i think the camera's target doesn't change..
What am i missing?
moving camera
moving camera
Dreaming of folk-art at http://www.ambersky.cz
Re: moving camera
Uhm, well - it should obviously work. But no idea what you are missing as I can't see what you are doing - please wait a little while I hack into your system so I can see your sources ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: moving camera
Well its basically this (its java, but i think what the hell)
Code: Select all
switch (key) {
case KEY_DOWN:
target = camera.getTarget();
target.setX(target.getX() + amount);
camera.setTarget(target);
target = camera.getPosition();
target.setX(target.getX() + amount);
camera.setPosition(target);
break;
..........
Dreaming of folk-art at http://www.ambersky.cz
Re: moving camera
Hm, well - I still don't know how your RTS-cam looks like. You should always do an updateAbsolutePosition between setting the position and the target (it's important for some camera-types).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm