Problem with camera target
-
DeusXL
Problem with camera target
I have create a camera scene node and when I want to do a rotation, the camera doesn't do anithing
I think it's because the target of the camera stay always the same and the rotation have no effect !
camera roation is just for the node - other nodes that are attached to the camera will rotate based on the cameras rotation.
Use setTarget() to change where the camera looks at
Use setTarget() to change where the camera looks at
.: http://www.mercior.com :.
-
DeusXL
And when you setVisible(false) a Mesh, animation don't work but I find something who work ( well ? ) :
Please help me because I think there is another way 
Code: Select all
cameratarget->setScale(vector3df(0.0f,0.0f,0.0f));
Irrlicht .NET complete and Cross Platform Wrapper
The kid on my avatar wrote:A painless lesson is one without any meaning
If you want progressive rotation then you'd need to keep an angle variable:
then keep updating the camera like so:
That should make the cameras target rotate in a circle around the camera. Hope it helps
Code: Select all
int angle;
Code: Select all
angle ++;
float xTarget, yTarget;
xTarget = sin(PI*(angle/180)) * 10;
yTarget = cos(PI*(angle/180)) * 10;
core::vector3df campos = camera.getPosition();
core::vector3df newTarget = campos + vector3df(xTarget, campos.Y, yTarget);
camera.setTarget(newTarget);
.: http://www.mercior.com :.