Hi there,
I got a very dumb question, I think
If I create a CameraSceneNodeFPS, I can rotate it without problems. But if I want to use a "normal" camera, he doesnt want to rotate . No matter what I do, he doesnt rotate at all. But if I then put back the FPS, it works. I have no idea please help me.
Camera doesnt rotate
-
- Posts: 275
- Joined: Fri May 12, 2006 6:37 pm
- Location: Germany
Yeah, I must say I´m not an absolute Beginner...but I´m now starting to code again after a while....
I just want to rotate the camera in initialization. 90° on the X-Axis, in fact. My code looks like this
EDIT: Found another strange thing:
Explaination: p.X is in this case the relative position of the cursor. The strange thing about this is, that if I now move the mouse at the left side of the screen, the camera moves along the X-Axis, but it doesn´t rotate. I´ve got the feeling the normal camera can´t rotate?!
I just want to rotate the camera in initialization. 90° on the X-Axis, in fact. My code looks like this
Code: Select all
camera->setRotation(vector3df(90.0f,0.0f,0.0f));
Code: Select all
if(p.X <= 0.1)
{
vector3df pos = camera->getPosition();
pos.X = pos.X - 5;
camera->setPosition(pos);
vector3df rot = camera->getRotation();
rot.X = rot.X - 50;
camera->setRotation(rot);
}
-
- Posts: 275
- Joined: Fri May 12, 2006 6:37 pm
- Location: Germany
OK, i already found a good solution at the forum:
No problems, everything works just like it should
Code: Select all
ICameraSceneNode *camera = smgr->addCameraSceneNodeFPS (0, 100, 500);
camera->setInputReceiverEnabled (false);
No problems, everything works just like it should