I'm building a simple physics simulation program and I have written a custom camera based on the FPS camera included with Irrlicht...
Problem is that I'm trying to make the camera orbiting around the center and move it with the mouse. I managed to make the camera move but it looks like it is first moved and then targeting the center (you'll see what I mean). Also, camera moves ok (kind of) around Y axis, but wrong around X axis...
Source for the camera is included in the zip.
ftp://216.75.41.174/demo.zip
Press the upper button to start the simulation, and Right Click to move camera... WSAD to move, and RF to move up/down, X to reset camera position.
Thanks...
camera question (demo included)
Re: camera question (demo included)
What if you move past the center? Then the camera would turn around and look back at the center, when you rotate it. I think it would be much more intuitive to have the camera rotate about the center of the view( the target).danut007ro wrote:I'm trying to make the camera orbiting around the center
I think the Maya camera would be more usefull to you than the FPS camera.
-
- Posts: 16
- Joined: Thu Apr 12, 2007 2:21 pm
I'm trying to implement my camera, with zoom and stuff.
If I move past the center I guess I will check that. But first I need the rotation code.
Travis : how to get the angles using current camera position? I mean I should get the angles every frame, calculate new position using your code, and then update the position. Sorry about that, but I'm quite weak at 3D math.
Thanks.
If I move past the center I guess I will check that. But first I need the rotation code.
Travis : how to get the angles using current camera position? I mean I should get the angles every frame, calculate new position using your code, and then update the position. Sorry about that, but I'm quite weak at 3D math.
Thanks.
-
- Posts: 16
- Joined: Thu Apr 12, 2007 2:21 pm
Midnight, if you mean object orbiting camera.rar, I already got that file, liked how it looks. But still it doesn't fits my needs. I need the camera to be FPS and also Maya-like.
So I guess I need to get those angles (Phi, Theta) every frame when I do rotation from the current camera position, calculate new position and then move it.
Maybe I'm wrong... Again, I'm not too good at 3D.
So I guess I need to get those angles (Phi, Theta) every frame when I do rotation from the current camera position, calculate new position and then move it.
Maybe I'm wrong... Again, I'm not too good at 3D.