# hkpRigidBody without shape and custom inertia.

## hkpRigidBody without shape and custom inertia.

I'm doing some testing of the Havok Physics sdk to see if it meets the requirements of my engine. Does anyone know if a hkpRigidBody can be created with out any shapes added? I'm trying to create a dynamic object with out any collision and a custom inerta matrix but I'm getting a crash when I try to create a new  hkpRigidBody with bodyCinfo.m_shape set to NULL.

4 post / 0 nuovi
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi Keith,

Rigid Bodies in Havok require a shape, but you could create a simple shape such as a unit sphere and use this as a dummy shape for all your 'shapeless' rigid bodies (which provides the additional benefit of display geometry for use in debugging).  Mass and inertia properties can be set explicitly in the hkpRigidBodyCInfo or on the rigid body directly.  Disabling collision can be achieved through a collision filter, for example, by making a collision layer that doesn't collide with anything.  More information on collision filtering can be found in the Havok Physics help docs under Interacting With A Simulation -> Collision Filtering.

Cheers,

Josh S. Havok Developer Support Engineer www.havok.com

Thanks for the help. I was afraid setting the inertia directly would cause problems.

Hi Keith,

It is possible to generate unintuitive behavior by setting the inertia tensor directly, so it's important to understand what the inertia tensor values mean.  Wikipedia has a good overview of these concepts: http://en.wikipedia.org/wiki/Moment_of_inertia

Also, Havok's inertia tensors are simplified somewhat when you set the inertia directly, depending on the motion type of the rigid body.  In particular, inertia tensors are in shape local space, and it is assumed that the shape is oriented such that its principal axes of inertia align with its local coordinate axes (ie. that its inertia tensor is a purely diagonal matrix).  This means that after setting the inertia for a rigid body with motion type MOTION_BOX_INERTIA, it will strip out all non-diagonal elements of the inertia tensor.

Cheers,

Josh S. Havok Developer Support Engineer www.havok.com

## Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri?