Jump to content
  • Advertisement
Sign in to follow this  

[Havok] Getting hkpRigidBody from .hkt file

This topic is 2340 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to export a Rigid Body from 3ds max to use in my game. It's just a box, with a Shape and Rigid Body modifier. Here's what the exporter shows.


Then, I'm loading the .hkt file through the hkSerializeUtil class.

hkResource* loadedData = hkSerializeUtil::load("test.hkt");

Here's where the problem seems to be. I'm not sure how to get this data into a hkpRigidBody object.

I've tried this with no success.

hkpRigidBody* contents = loadedData->getContents<hkpRigidBody>();

I also tried loading the data into hkxScene, hkpWorld, but they all just give null pointers.

Halp plz?

Share this post

Link to post
Share on other sites
Hello Yartch,
If you have added a box with a Shape and Rigid Body modifier and used the filters shown in your picture, you should be able to load the .hkt file in your application by using the hkpHavokSnapshot::load function as shown in the "hk'2011_2_0_'r1\Demo\Demos\Physics\Api\Dynamics\World\WorldSnapshot\WorldSnapshot" demo.

Also note that it is also important that you add the Transform Scene filter to your exporter as 3DsMax works in inches and Havok works in meters (you just need to set the Preset parameter to SCALE_INCHES_TO_METERS). This will avoid you some troubles later on.

If it still doesn't work please let me know which version of Havok you are working with and attach the exported .hkt asset and I will take a further look at it.

David Grosman. Edited by havokDavid

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!