my problem is that when i make an Y rotation on the object and so on the camera that is locked on the object both rotate around the origin and not around themself, so in order to go farther from the origin they rotate in circle always lookin at the origin
camera with direct3d9
Not sure why but my earlier email seemed to get lost. If it did not apologies for posting again.
I have written a little web page on creating a 1st person camera in DirectX that should address your issues, you can see it here:
http://www.petra.demon.co.uk/Games/camera.html
I have written a little web page on creating a 1st person camera in DirectX that should address your issues, you can see it here:
http://www.petra.demon.co.uk/Games/camera.html
quote:Original post by kevlur
my problem is that when i make an Y rotation on the object and so on the camera that is locked on the object both rotate around the origin and not around themself, so in order to go farther from the origin they rotate in circle always lookin at the origin
Sounds like you are just applying the translation and rotation matrices in the wrong order. Rotating then translating rather than translating then rotating.
I had a hard time with setting up a camera so..... I found an example of how to do it and learned from it, it can kinda be hard if you don't read up on the math about it. Basically a good link with an example of how to set it up can be found at here, its the second camera example on that page
However you will probably have to make it a bit better, its not really very fast, mainly because there is to much mouse padding if you ask me. So, you kinda have to fix it up a bit but it will get you where you want to go. Its probably a good idea to change the angle movement with the mouse to direct input instead, mainly because thats a lot faster.
[edited by - DevLiquidKnight on February 9, 2004 3:42:23 PM]
However you will probably have to make it a bit better, its not really very fast, mainly because there is to much mouse padding if you ask me. So, you kinda have to fix it up a bit but it will get you where you want to go. Its probably a good idea to change the angle movement with the mouse to direct input instead, mainly because thats a lot faster.
[edited by - DevLiquidKnight on February 9, 2004 3:42:23 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement