Hi folks. Brand new here. A bit noob about 3d rendering too.
Well, I struggle against Irrlicht engine since a few days and the things are getting clearer. But there is some things that I cannot understand at the oment and I cannot find any help on the forum.
Well, sometimes camera deals with its "up vector" and I don't see at all what it means.
Anyone could help ?
Thx !
Camera Up Vector
Up vector is camera top direction.
Code: Select all
. up vector (0,1,0)
. . .
.
.
y
................
. .
-x . . x normal camera
. .
.................
-y
camera turned right
y
................
. . .
-x . . x . . . . up vector (1,0,0).
. . .
.................
-y
think of it this way
a camera in space can be defined by,
a) where it is located (position)
b) where it is pointing (target)
c) which direction is upwards for the camera (up)
now in most cases the up vector is (0,1,0) in FPS games and RPGs etc. since you are always walking on the ground... but in some 6 DOF games like Descent or Other Flight Sims it is possible to rotate the camera arbitraily hence.. the up vector becomes helpful in .. well .. finding which is the up direction for the camera...
a camera in space can be defined by,
a) where it is located (position)
b) where it is pointing (target)
c) which direction is upwards for the camera (up)
now in most cases the up vector is (0,1,0) in FPS games and RPGs etc. since you are always walking on the ground... but in some 6 DOF games like Descent or Other Flight Sims it is possible to rotate the camera arbitraily hence.. the up vector becomes helpful in .. well .. finding which is the up direction for the camera...
---
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Saurav Mohapatra
author, artist and bona fide geek
web: http://www.mohaps.com
email: mohaps AT gmail DOT com
Thanks a lot for this.
Now I'm messing up a bit with the target vector. Whatever I enter in setTarget method of my camera scene node, the camera always looks down to the ground and I always get [0,0,100] as target vector with getTarget method.
For example, I have a testnode on which I apply a flystraight animator and I want the camera to follow up this testnode using setTarget but I cannot see how to achieve that since all I can do with setTarget is messing up the display as described above.
Thx again for your precious help folks !
Now I'm messing up a bit with the target vector. Whatever I enter in setTarget method of my camera scene node, the camera always looks down to the ground and I always get [0,0,100] as target vector with getTarget method.
For example, I have a testnode on which I apply a flystraight animator and I want the camera to follow up this testnode using setTarget but I cannot see how to achieve that since all I can do with setTarget is messing up the display as described above.
Thx again for your precious help folks !
Up !
After some experiments, it seems that I fail to setTarget on anything using a FPS-type Camera. If I use a "standard" ICameraSceneNode, I can target on something, but I have to handle by myself all camera movements. Damn !
I'm really stuck with this, anybody could tell me why I have such difficulties to targer on something using FPS camera node ?
Thx !
After some experiments, it seems that I fail to setTarget on anything using a FPS-type Camera. If I use a "standard" ICameraSceneNode, I can target on something, but I have to handle by myself all camera movements. Damn !
I'm really stuck with this, anybody could tell me why I have such difficulties to targer on something using FPS camera node ?
Thx !
-
- Posts: 26
- Joined: Wed Jan 26, 2011 12:13 am
Re: Camera Up Vector
Why doesn't the camera like using a rotation instead of a target?
Re: Camera Up Vector
Please check ICameraSceneNode::bindTargetAndRotation http://irrlicht.sourceforge.net/docu/cl ... 5ac54e7205
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
-
- Posts: 26
- Joined: Wed Jan 26, 2011 12:13 am
Re: Camera Up Vector
does it bind upvector?
Re: Camera Up Vector
No, it binds target and rotation. The upvector is independent of that.
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