|
-
Senior Member
Depth and shooting
Alright, I have a little bit of a problem. I am creating an average shooter game where things pop up behind things and you shoot them. Everything is going fine, however, I am having troubles figuring out how I can work the shooting. The problem is that, two objects could have the same x and y positions, but different depths. If I shot at the first one, I'd want the xscale of my projectile to be a lot larger than if I shot at the 2nd one. Also, if I shot at the first one, I'd want my projectile to move to my cross hairs fairly quickly, whereas if I shot at the distant projectile, my shot would take a little bit longer to reach the crosshairs. My only solution thus far is to check when the mouse is clicked to see what is currently at that x and y position and determine if it is close up or distant. I don't really like the solution and I can see a lot of problems with it. Any other ideas?
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|