Hi all Irrlichtians,
first of, a happy new year to all.
I am using a camera_parent ( to move a ship) wich is not the active one nor receiver enable, I move and rotate it myself using quaternion, it works fine because when I make it active after a tranformation I see it has moved. But the child (ship) don't rotate.
the ship is a animatedscenenode.
The thing is I want the view from another camera. I guess I have to force the updating of the camera_parent, I tried updateabsoluteposition(), on camera_parent and its child also, I tried cam->setRotation(cam->getTarget() - cam->getAbsolutePosition());with and without gethorizontalangle, none work.
Anyone having a clue would be very welcome.
TIA,
regards, Robert
PS: I am using a camera to get over the fact that objects are always rotated in x-y-z order, which cancel the absolute x rotation in my app...
the cam hrotation handling should get me over this.
child of camera don't move...
-
robertgarand
- Posts: 69
- Joined: Fri Feb 22, 2008 6:47 pm
- Location: montreal
- Contact:
child of camera don't move...
If it can't be writen, it can't exist
Well, try something like this:
In your main loop do this:
updateShip(camera, shipNode);
Simple, but I think this may fix your problem, if you haven't already tried it.
Good luck!
Code: Select all
void updateShip(ICameraSceneNode *camera, IAnimatedMeshSceneNode* node)
{
node->setPosition(camera->getPosition() + vector3df(0,-4,15));
node->setRotation(camera->getRotation());
}updateShip(camera, shipNode);
Simple, but I think this may fix your problem, if you haven't already tried it.
Good luck!
