Skip to main content
gamedev.net
🔒 Locked

FPS Camera question

Started by Andreas Persson Jan 24, 2006 at 8:35 AM 1 replies 450+ views
Original Post
Andreas Persson
Andreas Persson
Hi I was wondering about the best way to consturct a FPS camera. Should I make the weapon follow the camera or the camera follow the weapon?
Casual game dev www.apgames.se
Endar
Endar
If you've got just the weapon and camera, and no player character? I'm not sure it matters all that much. Although you might want to have the weapon attatched to the camera, as it's probably easier to conceptualize a camera having a bounding box/sphere/whatever you use for collision, than just a weapon.

Unless you'll be creating a basic 'Player' class that contains only a camera and weapon, without a player model and just have the Player class contain the bounding information.
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
smittix
smittix
The best way to do it is probably to have the movement controls move the camera, then position the weapon from the camera's View matrix. Or you could always just overlay a 2D sprite, assuming you didn't want to light or shadow it dynamically.

-Chris

Topic Locked

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

Sign in to reply to this topic.