Buggy misc item collision

Post » Mon Aug 10, 2009 11:40 am

Hi,
I'm having a problem with custom collision. I've created a new potion bottle in 3ds max, exported via the latest nif exporter folloving this tutorial:

http://cs.gamesas.com/constwiki/index.php/3ds_Max:_Misc_Items

As far as I can tell the collision looks OK in Nifskope, but in-game it's very buggy, sometimes the items falls through the floor, sometimes not etc...
I've tried a few things, but I don't really know much about nifskope collision...

Here's the .nif I'm using:

http://rapidshare.com/files/361077432/skoomabottle.nif

I know I could copy beth's collision for the bottle, but that won't solve the problem for any future objects...

Thanks for any help.
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Mon Aug 10, 2009 9:54 am

Don't use mesh based collision for havok items. Use either primitives (box, sphere, capsule shapes) or a convex shape.
User avatar
Irmacuba
 
Posts: 3531
Joined: Sat Mar 31, 2007 2:54 am

Post » Mon Aug 10, 2009 3:47 pm

Thanks for the fast reply. It still seems to happen though... I tried using a box as the collision mesh, but the item still falls through the ground ?

This is the nif now:

http://rapidshare.com/files/361088826/skoomabottle.nif
User avatar
hannah sillery
 
Posts: 3354
Joined: Sun Nov 26, 2006 3:13 pm

Post » Mon Aug 10, 2009 10:03 am

You still use mesh based collision. The shape of the collision is not important, the type is. Instead of bhkPackedNiTriStripsShape you need to use bhkBoxShape, bhkCapsuleShape, bhkSphereShape or bhkConvexVerticesShape. You can select the type of collision before export in max. They are limited and can't have any shape you want, but for havok items it is more then enough.

EDIT: In your case a convex shape would be best, but a box shape should work as well. Only problem with a box shape is that you can put the bottle upside down without it falling over and that it won't roll.

EDIT2: http://www.file-upload.net/download-2331319/Bottle.nif.html is the bottle with convex shape.
User avatar
Sammi Jones
 
Posts: 3407
Joined: Thu Nov 23, 2006 7:59 am

Post » Mon Aug 10, 2009 3:05 pm

Did some experimental poking around, and it works great now. The box shape is alright. Thanks for the explanation. :)
User avatar
Destinyscharm
 
Posts: 3404
Joined: Sun Jul 23, 2006 6:06 pm


Return to IV - Oblivion