The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

C++, Degrees and Space Mines by really-joel2007-08-08 07:24:21
  It's simple in theory.... by Didactylos 2007-08-08 07:42:08
in practice, there are some interesting aspects. Collision detection, for example - if you evaluate using a bounding box at every time step, the bullet could pass through the target without ever "hitting" it.

Then there's the basic physics. You need to decide on all sorts of things concerning your in-game physics - do you have gravity, air resistance....?

And your actual question? You need to add time and initial velocity to the equation. Solve for time, then convert to cartesian coordinates. I'm sure someone else will have answered more fully by the time I've typed this.....
[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)