Game Development Reference
In-Depth Information
How it works...
The Bullet class can almost be seen as a slow ray. The Ray instance we have in Bul-
let is mostly out of convenience, since it's already prepared to collide with targets. By in-
crementing the position of the ray and having a short limit for it, we have a Ray instance
that takes little steps forward in the game world, checking for collisions in each update.
If a collision has occurred, the returned CollisionResult contains information about
where the collision has occurred, with what, and whether it can be used to build further
functionalities.
Search WWH ::




Custom Search