camera rotation problem
camera rotation problem
i want to use png-texture with transparent and semi-transparent zone for billboard and cube nodes?
if i use only:
video::ITexture *frame0=driver->getTexture("media/car.png");
billboard->setColor(video::SColor(255,255,255,255),video::SColor(255,255,255,255));
billboard->setMaterialFlag(video::EMF_LIGHTING, false);
billboard->setMaterialTexture(0,frame0);
then trasparent zone drawed by black color =(
what can i do for solve this "problem" ?
if i use only:
video::ITexture *frame0=driver->getTexture("media/car.png");
billboard->setColor(video::SColor(255,255,255,255),video::SColor(255,255,255,255));
billboard->setMaterialFlag(video::EMF_LIGHTING, false);
billboard->setMaterialTexture(0,frame0);
then trasparent zone drawed by black color =(
what can i do for solve this "problem" ?
Last edited by kkray on Sun Nov 04, 2007 12:39 pm, edited 1 time in total.
thanks!!
maybe you now, how i can rotate (not animate) camera around it self (if player in game bend his head on side)?
i use this code:
scene::ICameraSceneNode *camera = smgr->addCameraSceneNode(smgr->getRootSceneNode(),core::vector3df(100,100,100),core::vector3df(0,0,0),-1);
camera->setRotation(core::vector3df(45,45,45));
but result of last string working is equal to result of this string working:
camera->setRotation(core::vector3df(0,0,0));
why?
maybe you now, how i can rotate (not animate) camera around it self (if player in game bend his head on side)?
i use this code:
scene::ICameraSceneNode *camera = smgr->addCameraSceneNode(smgr->getRootSceneNode(),core::vector3df(100,100,100),core::vector3df(0,0,0),-1);
camera->setRotation(core::vector3df(45,45,45));
but result of last string working is equal to result of this string working:
camera->setRotation(core::vector3df(0,0,0));
why?
Hi irr-comunity,I have same kind of problem.
I try to flip camera, but then I flip it, my mouse become inverted. In my opinion it is not right, because if camera is like my eys and if I stand on my head my left side is still on my left and my rightside on my right.
Here is code:
I try to flip camera, but then I flip it, my mouse become inverted. In my opinion it is not right, because if camera is like my eys and if I stand on my head my left side is still on my left and my rightside on my right.
Here is code:
Code: Select all
scene::ICameraSceneNode* camera =
smgr->addCameraSceneNodeFPS();
camera->setUpVector(core::vector3df(0,-1,0));
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi. Sepi.
I've asked for this some time ago. But the mouse controller is not oriented with the UPVector of the camera.
That is a feature that will need to be implemented. For some things it's good that the mouse is not totally following the axis of the camera (head tilt) But if you would like to walk in a ceiling or walls, there need to be a new camera controller that support this (remapping the X-Y mouse coordinate plane into the X,Y,Z of the world.)
At the moment, if you really want to do this, you will have to use the standard camera and create your own controller.
I know that Bitplane is working on camera controller but don't know if we will able to do this. Since my current skills for C++ and math are not good enough, I'm still waiting.
I've asked for this some time ago. But the mouse controller is not oriented with the UPVector of the camera.
That is a feature that will need to be implemented. For some things it's good that the mouse is not totally following the axis of the camera (head tilt) But if you would like to walk in a ceiling or walls, there need to be a new camera controller that support this (remapping the X-Y mouse coordinate plane into the X,Y,Z of the world.)
At the moment, if you really want to do this, you will have to use the standard camera and create your own controller.
I know that Bitplane is working on camera controller but don't know if we will able to do this. Since my current skills for C++ and math are not good enough, I'm still waiting.
-
- Competition winner
- Posts: 189
- Joined: Tue Oct 16, 2007 3:53 am
- Location: Indonesia
- Contact:
i'm not sure, i'm experiencing the same problem with u. first time in irrlicht i'm confused with the coordinate system, because i can rotate the camera all the way. and in my case i use blender to export my models and when loaded. i got to rotate the camera in order to make my model in the correct perspective. when i use the FPS camera i realize that what i did is wrong because when move i got wrong direction to move. so try not to transform the camera but rotate the model. hope this help
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Yes, I tought about that idea. Rotate the environnement instead of the player. It should work. But you will have to build(parent) you scene based on a specific node and rotate that node (so all objects will positionned exacltly the same)
Irrlicht has a global coordinate system. Software like Blender can use multiples coordinate system.
Global - X,Y,Z for the entire world
(Depending on the system, for Lightwave for example, X is for the horizontal axis, Y is for the vertical axis and Z is for the depth axis)
Local - X,Y,Z aligned on the current object(node) aligment.
Quick and simple example: Camera is "parented" to a box and looking 45 degree. The box is rotated 45 degree, so in local axis the camera is at 45 degree but for the global axis it's 90 degree.
Not sure IRRlicht as function to convert for a coordinate system to another.
Irrlicht has a global coordinate system. Software like Blender can use multiples coordinate system.
Global - X,Y,Z for the entire world
(Depending on the system, for Lightwave for example, X is for the horizontal axis, Y is for the vertical axis and Z is for the depth axis)
Local - X,Y,Z aligned on the current object(node) aligment.
Quick and simple example: Camera is "parented" to a box and looking 45 degree. The box is rotated 45 degree, so in local axis the camera is at 45 degree but for the global axis it's 90 degree.
Not sure IRRlicht as function to convert for a coordinate system to another.
-
- Competition winner
- Posts: 189
- Joined: Tue Oct 16, 2007 3:53 am
- Location: Indonesia
- Contact:
Code: Select all
188 C:\irrlicht\main.cpp 'class irr::scene::ISceneNode' has no member named 'setUpVector'
Code: Select all
cam->setUpVector(core::vector3df(0,-1,0));
That is because the type of cam is ISceneNode*, but it needs to be ICameraSceneNode*. The code posted by sepi is more like what you need.188 C:\irrlicht\main.cpp 'class irr::scene::ISceneNode' has no member named 'setUpVector'
The position of the child never has any effect on the parent. The position of the parent will affect the position of the child though. It doesn't matter when you change the position though, the effect is the same. The position of the child is always relative to the parent.relative position? did u mean if i transform(rot,scale,trans) the node before attach to parent will not affect the parent?
Travis