It has been quite the period since my last tutorial on Havok and a number of things have changed. This tutorial will show you how to get started with the latest version of Havok (version 2013.1.0) and set it up in a new project at its bare bones. However, before you continue, it may be helpful for you to check the StepByStep Demos section found in the Quickstart Guide in /Docs and this tutorial written by a Havok engineer. Better to get information from the horse’s mouth, after all.
My last tutorial on getting started with Havok, while out of date, may still be of use and I will not be redoing the ‘Downloading and Exploring’ section as that is still mostly still the same. Also, in this tutorial, to keep it simpler, I will not be using Havok multi-threaded. The code for that doesn’t seem to have changed much, but you can refer to the Physics2012ExampleMt for getting started with multi-threaded. If you’ve downloaded the latest version, this can be found in /Demo/StandAloneDemos/Physics2012.
There’s a few prerequisites for this (and possible future) tutorials: some basic C++ skills and the Microsoft Visual Studio 2012 C++ IDE. The latter will differ on the year (2012 or 2010) depending what version of Havok you use, which you can determine by looking in the brackets when you go to download Havok. It would also be helpful to have some general understanding on how physics engines work.
Code (with comments) for this tutorial can be found at the end of this tutorial.
Now, without further ado, let us begin.
Continue reading →