Long story short: I've switched to a third person - top down perspective. The camera is fixed and looks down at the player. How can I implement 3d aiming ? The player needs to aim left and right as well as up and down.
details: I've ditched the first person perspective in my current project - I wouldn't call it a game yet, it's more of a test-case. Instead I'd prefer a third person perspective with the user looking down at the player (slightly tilted to the back). The implementation is no problem, the aiming system is. Although the player will be rarely armed there will be situations where he's allowed to return fire.
This is more complicated than it sounds since the player needs to aim up and down. I hope you can envision my problem. In an ego shooter moving the mouse let's the player look up/down and left/right . In a top/down game the mouse points in the direction the player is moving. I'm currently casting a ray from the camera and the player looks at the first collision point of that ray. That means to aim at an enemy the player just needs to hover the mouse over him. Not very comfortable, no skill required at all.
I've thought about this: The player is always centered on the screen, the mouse 2d coordinates are computed to a 2d vector that is used as the player's viewing direction. This way he couldn't look up or down but then again that's only visuals the camera wouldn't be moved in any case. In order to shoot the player presses the right mouse button. The mouse movement is now mapped to the player just as in any common shooter. Mouse up -> look up. Mouse left -> turn left. Don't misunderstand me: I don't intend to move the camera only the player charaTo show the player where he's aiming I then draw a line to his target (or a cone for less precise weapons).
What are possible pitfalls ? Have you done something like this and can tell me if it's usable ? I've never played a game that worked this way and just wonder if it's a good idea
UPDATE: I've accepted an answer but of course I'm still interested in other options. If you've got a good idea that fits here I'd highly appreciate it.