Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Android Game Development

You're reading from   Learning Android Game Development A Beginner's guide to developing popular Android games

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781785880957
Length 238 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nikhil Malankar Nikhil Malankar
Author Profile Icon Nikhil Malankar
Nikhil Malankar
Arrow right icon
View More author details
Toc

Collision detection


To explain it simply, collision is a short duration interaction between two bodies. There are many different types of collisions such as elastic and non-elastic. The study of the intersection of two or more objects overlapping each other is called as collision detection. It is one of the most complex pieces of computational mathematics and is divided into many types, such as:

  • Bounding Box Collision: This is the simplest form of collision techniques wherein we take two rectangles and check for collision if they overlap each other. For this, we need four coordinates of each rectangle, namely, the x and y position and width and height of both rectangles.
  • Circle Collision: This is the second simplest type of collision wherein we test for collisions between two circles. Here, the radius of two circles and x and y position of the center of the circles are taken into account to test for overlapping.
  • Separating Axis Theorem: This type of collision is a bit more complex than the...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime