Skip to main content

Motion and Collision

  • Chapter
  • First Online:
Book cover Beginning Android 3D Game Development
  • 2444 Accesses

Abstract

In this chapter, I will discuss motion and collision. In terms of motion, I will discuss the basics of an object’s linear velocity, linear acceleration, angular velocity, and angular acceleration. I cover Newton’s three laws of motion and the new Physics class we have created to implement these laws of motion. I then discuss a hands-on example that demonstrates with a bouncing and rotating cube how to apply linear and angular acceleration to objects. Next, I cover collision detection and collision response and add code to our Physics class to implement this collision detection and collision response. I then go through a hands-on example where we add in another cube on top of the one from the previous hands-on example and demonstrate our new collision detection and response code. Finally, we create a gravity grid and then demonstrate its use by adding this grid to the previous hands-on example with the two colliding cubes.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Robert Chin

About this chapter

Cite this chapter

Chin, R. (2014). Motion and Collision. In: Beginning Android 3D Game Development. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-6548-1_5

Download citation

Publish with us

Policies and ethics