Havok for CD only?

Havok for CD only?


I'm developing an arcade space game, and I'm handling entity movement myself.

I'd like to use Havok for collision detection and raycasting only, and leave the dynamics simulation out.

Is this possible?


2 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de havokmax

Hi, it's possible. The simplest way would be to set the positions of your rigid bodies directly and never step the physics simulation. A better approach is to set the velocities so that the bodies will move where you want them to be in the next frame, and step the physics simulation to update them. So for example, if you have a ship at x=10 that you want to move to x=12 in the next frame, and the timestep is t, then set the x-velocity to (12 - 10) / t. This is more efficient because it allows Havok to batch update all of the broad phase info during the physics step, instead of doing it separately every time you set an body's position.

You can disable collisions in the physics step by using motion type = MOTION_KEYFRAMED for all bodies, and you'll still be able to raycasts and other collision detection queries. There are many demos that show what sort of queries are available, I recommend taking a look at:



Connectez-vous pour laisser un commentaire.