The Daily Click ::. Forums ::. Klik Coding Help ::. Aiming System
 

Post Reply  Post Oekaki 
 

Posted By Message

Deleted User
30th December, 2008 at 02:12:55 -

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
Image

 

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.

 

-J-



Registered
  05/10/2008
Points
  228

VIP MemberThe Cake is a Lie
30th December, 2008 at 08:02:31 -

Is this the aiming method you're after?

I picked this trick up just a few weeks ago

http://www.mediafire.com/file/dqlxhhzmzfn/Aiming.mfa

 
n/a ...

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
30th December, 2008 at 13:08:15 -

How about this?
http://cid-b1e7ee094271bbda.skydrive.live.com/self.aspx/Public/Aiming.mfa

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?

 
   

Post Reply



 



Advertisement

Worth A Click