Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / camera point problem

Author
Message
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 10th May 2008 17:43
why is this:

the same as this:

and how to do i get it to point the opposite direction
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 11th May 2008 01:37
Quote: "why is this:... the same as this:..."

Because you are pitching the object up and back down again therefore canceling both their effects...

Quote: "and how to do i get it to point the opposite direction"

If the camera angle is dependent on the object then just dbRotateObject around whichever axis you wish...

~~It's not who you are underneath, but what you do that defines you.~~
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 11th May 2008 12:22
I want the camera to be pointing the opposite direction from the object. so i rotate the object, set the camera to point the same way as the object, and then rotate the objetc back. that should work
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 11th May 2008 19:13
Instead of pitching the object why not keep it like it is and just rotate the camera? Try this...




You're not giving me enough information... I need to know which axis your camera is travelling along and then we will know which axis to rotate around... Post your whole source code if you can.. Or if it's super-mega-huge just post a larger relevant snippet...

~~It's not who you are underneath, but what you do that defines you.~~
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 11th May 2008 21:57
Well im making this game because I was bored of failing to get BSPs to work so I tried something other than an FPS, and I thought that a space fighter sort of sim would be nice and easy. So i have this object that is the ship, and I wanted the camera to be directly behind it. easy enough, except that the ships front is actually its back if you get me. so it doesnt need to only point the opposite way in one axis, but the exact opposite, including camera tilting to the side and stuff. I assumed my orignal code would work, and I want to know why it doesnt
Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 12th May 2008 00:23
How about you just rotate it around whatever axis you need before the loop, and then it should act normal...

I haven't tried what you are trying to do yet so I'm not quite sure... But if you need exact opposite, then maybe you should just put in exact opposite... I can't help you out unless you post some more of your code... Because it is hard to see exactly what you are doing without the code...

~~It's not who you are underneath, but what you do that defines you.~~

Login to post a reply

Server time is: 2024-11-20 09:14:47
Your offset time is: 2024-11-20 09:14:47