Alright, well, my game is a top down style shooter controlled by the WASD keys and the mouse, and well I'm having some issues. I've got the movement hammered out with strafing and everything, but I have no clue where to start with the collision detection of the aiming system.
My basic goal is this. There is your target which is trapped between a small circle on the player and a distance that is determined by the weapon's range. Also, the screen follows an invisible object that is following an invisible object that is on the mouse. The mouse should not be able to pass a certain point determined by where the player is. So it should look something like this:
Green: Mouse should not pass this, nor should the screen
Blue: Range of the gun, target should not cross this
Red:Circle around player, target should not pass this, prevents player from instantly turning
Deleted User
30th December, 2008 at 02:18:59 -
I actually just thought of a way to do the mouse screen movement, but I'd still like to hear some suggestions for the previous one I just mentioned.
The mouse panning is a bit over-complicated, but the aiming/range part is good.
Edited by Sketchy
n/a
Deleted User
30th December, 2008 at 18:31:42 -
EDIT: It's workin now.
Edited by an Administrator
Deleted User
30th December, 2008 at 20:57:39 -
Sketchy, you had exactly what I was looking for, and Julians has some nice stuff too. Thanks alot guys.
Deleted User
31st December, 2008 at 00:33:10 -
There is one more issue.
I like the feel of the one sketchy posted, that allows the player to move the crosshair back and forth, but I liked how with the one julian posted the crosshair slides around the obstacles. Would there be a way to combine the both of them?