camera rotation.. does camera has it's own coordiate system?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
J.sean
Posts: 21
Joined: Tue Sep 08, 2009 6:51 pm
Location: Korea

camera rotation.. does camera has it's own coordiate system?

Post by J.sean »

hi all..

I'm having so much troble with camera rotation..

I put the camera behind my character.. and set the target position with the location of character... so far so good...

but when I want to rotate my camera regardless of the character, the problem comes up... sometimes it's jagging... sometimes go for wrong target..... I just can't understand... haha.. so frustrated.....


when I used DARK GDK, it was so easy to rotate camera along it's own axes... cause it provided camera's rotation with it's own axes... but.. with irrlicht... I can't find sucha function... nor I can't make one...


abyway.... bottom line is... I wanna make this kind of camera.. please check the link..... can you guys give me any clue????

http://pds16.egloos.com/pds/200909/10/5 ... Hiking.zip
Alpha Omega
Posts: 288
Joined: Wed Oct 29, 2008 12:07 pm

Post by Alpha Omega »

So just to clarify.. you are trying to rotate the camera around a center point. You would not use the rotation to do this....Use polar cooridinates for a circle and update the camera position.
J.sean
Posts: 21
Joined: Tue Sep 08, 2009 6:51 pm
Location: Korea

Post by J.sean »

yeah... you're right... I tried to use rotate function in vector.. and it didn't work as I wanted...

could you give me a little bit more hint please?? what kind of function should I use?? and.. what type?? vector? matrix??


ah... and you know.. the position of camera is fine.. once I put this on the back of character, it sticks there......

but the target of camera's problem... I think it uses absolute coordinate system.. (I mean absolute position).. it would be much easier if it used camera's own coordinate system, just like the position of camera...
Alpha Omega
Posts: 288
Joined: Wed Oct 29, 2008 12:07 pm

Post by Alpha Omega »

Ok so how did you fix the camera position? If you set it as a child of the character than any position or rotation changes will change RELATIVE to the parent. I still dont know what the problem is could you please clarify?
J.sean
Posts: 21
Joined: Tue Sep 08, 2009 6:51 pm
Location: Korea

Post by J.sean »

oh..

yeah.. the position of the camera is relative to its parent..

but target of camera is not relative to its parent...

it uses absolute position..

for example..... if the position of camera is (0, 0, 0), it means the position of it's parent... but if the position of target is (0, 0, 0), it means actually (0, 0, 0) of the world.. not relative to it's parent..

I don't understand why the position of target is using absolute coordinates.. not relative coordinates of its parent....
Alpha Omega
Posts: 288
Joined: Wed Oct 29, 2008 12:07 pm

Re: camera rotation.. does camera has it's own coordiate sys

Post by Alpha Omega »

I don't understand why the position of target is using absolute coordinates.. not relative coordinates of its parent....
getTarget() must be absolute because it defines a distinct area in 3 dimensional space. If it did not use absolute cooridinates then it would not function properly as in objects could be in the in different locations but have the same cooridinates.
J.sean
Posts: 21
Joined: Tue Sep 08, 2009 6:51 pm
Location: Korea

Post by J.sean »

hmmm... yeah... thanks for reply.. I appreiate...

ugh.. but still can't make a camera like the link up there...

how can I rotate the camera that is child to character properly...??

it's killing me...

haha~ can anyone answer please?? ^^
Post Reply