Skip to main content
gamedev.net
🔒 Locked

Camera Dependent Input?

Started by bzroom Jan 18, 2004 at 11:09 AM 0 replies 300+ views
Original Post
bzroom
bzroom
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?
psykr
psykr
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.