Archived

This topic is now archived and is closed to further replies.

bzroom

Camera Dependent Input?

Recommended Posts

bzroom    647
I have my camera values stored in 6 floats, TO and FROM, so I have a look vector. I have this table (like a monkey ball game) and I want to rotate the table on its X and Z axis, but when I push up on the mouse I want the table to rotate depending on how the camera is facing, if the camera is looking up the Z axis and I push up on the mouse it should rotate along the X axis. Any links or suggestions?

Share this post


Link to post
Share on other sites
psykr    295
I store my camera in terms of a position, and then a lookat direction. To rotate, I make the mouse''s x/y movements into angles (look up spherical coordinates). I have yet to do any collision detection, sometimes the camera goes behind walls, but it''s good for a third person view.

Share this post


Link to post
Share on other sites