Noob need help in integrating havok

Noob need help in integrating havok


I just wished to know if there are any tutorials to help in integrating havok into a 3rd party engine. Im currently creating my own engine which uses Directx and its working perfectly but the physics is poor. I've been reading the api and looking at the samples but i hope if anyone can help me out by showing me tutorial or simply writing down. Thanks very much.

6 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Hi Brave Heart--

There are many useful resources for getting started. This stickied thread is a good place to get started:

Another useful resource might be Project: Anarchy, which is a complete game engine that Havok is providing for free on mobile platforms. However, it also includes source code for integrating Havok Physics into that engine, which might be helpful. There are a variety of other projects on this forum where community users have integrated PCXS into various engines. Please let me know if you have any more specific questions.


Is there any tutorials to help in integrating havok animation into an engine since I can't seem to find any tutorials even on YouTube. Also, how can I create a physics model for my model which will be used in the engine? Does the physics system enable input from models exported from 3ds max by the animation plugin? If you can please explain the steps on how to export a physics model already created in 3ds max and then import it into the physics engine as another object in the "physics world" I'll be very glad.

Thanks very much.

Hi Brave Heart--

Havok Physics shapes can be created programmatically, or inside of a modelling tool. If you chooset the latter approach, you'll need to download and install the Havok Content Tools for PCXS (accessible from the same page from which you got the runtime. The documentation includes modeller specific tutorials on exporting Havok data - look for the User Guide PDF in the Docs folder of the PCXS SDK in the chapter titled "Havok Content Tools."

In terms of getting animation specifically set up, you should start by reading the User Guide chapter on Havok Animation. The Animation Showcase demo (\Demo\Demos\ShowCase\Animation) is a good place to see how to integrate various aspects of the Animation library into a cohesive application.


Having just integrated Havok myself for the first time, i can share a few points i found that may help others:

1) You can compile in Visual Studio 2012 (sort of...)

At time of writing, the havok pre-built libraries are for VS2008 and VS2010, you can use them in VS2012 however you will have to download and install VS2010. In your project in VS2012 you need to go to "Project Properties -> Configuration Properties -> General -> Platform Toolset" and set it to "Visual Studio 2010 (v100)" which should be an available option from the drop down list once VS2010 is installed. If you dont do this you will see errors such as ".....error LNK2038: mismatch detected for '_MSC_VER': value '1700' doesn't match value '1600' in..."

2) The Havok Visual Debugger is missing from the free "2012-2-0" download package

I downloaded the package "" however the havok visual debugger file is missing from this package, i then had to download the "" to get it.
The file should be located at "Tools\VisualDebugger\hkVisualDebugger.exe"

3) Runtime Errors when calling "stepDeltaTime" using the SIMD packaged havok

After compiling the demos and other projects and having those work fine, I created a new project and was getting errors from "stepDeltaTime" after a few advances of the physics simulation. It turns out if you have downloaded the SIMD package then you have to enable the SIMD preprocessor statement or you will get these errors at runtime. Adding the preprocessor define "HK_PLATFORM_SIM" to the preprocessor definitions in my project fixed everything. Below is the stack track of the runtime error i would get just about every time:

Game.exe!hkVector4Util::convertQuaternionToRotation() Line 336    C++
Game.exe!hkRotation::set() Line 13    C++
Game.exe!hkTransform::setRotation(int quatRotation) Line 54    C++
Game.exe!hkSweptTransformUtil::calcTransAtT1() Line 84    C++
Game.exe!hkSweptTransformUtil::_stepMotionState() Line 220    C++
Game.exe!hkRigidMotionUtilApplyForcesAndStep() Line 281    C++
Game.exe!hkpSimulation::integrateIsland(unsigned int island) Line 571    C++
Game.exe!hkpSimulation::integrateInternal() Line 680    C++
Game.exe!hkpSimulation::integrate(int physicsDeltaTime, hkpPhantom * const & timeblock134) Line 158    C++
Game.exe!hkpSimulation::stepDeltaTime(int physicsDeltaTime, hkpPhantom * const &) Line 367    C++
Game.exe!hkpWorld::stepDeltaTime() Line 2435    C++

Thanks Everyone :)

Deixar um comentário

Faça login para adicionar um comentário. Não é membro? Inscreva-se hoje mesmo!