O'Reilly logo

The Essential Guide to Physics for Flash Games, Animation, and Simulations by Adrian Dobre, Dev Ramtal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Doing physics in 3D

With the exception of some simple examples in the earlier chapters, the coded examples in this book have all been in 2D. What does it take to do physics in 3D? How do the physics and coding in 3D differ from that in 2D?

3D versus 2D physics

Let's first discuss 3D physics. Most of the physics we've discussed is essentially unchanged in going from 2D to 3D. The fundamental laws of motion for linear and rotational motion remain the same in their vector forms. Particle motion is treated in a similar way, with the difference that in 3D particles can move in an extra dimension (that's obvious, isn't it?). Later on in this section we'll extend the motion classes to 3D, which will allow you to simulate the motion of any number of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required