Page 1 of 1

Buggy misc item collision

PostPosted: Mon Aug 10, 2009 11:40 am
by Laura Mclean
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.

Buggy misc item collision

PostPosted: Mon Aug 10, 2009 9:54 am
by Irmacuba
Don't use mesh based collision for havok items. Use either primitives (box, sphere, capsule shapes) or a convex shape.

Buggy misc item collision

PostPosted: Mon Aug 10, 2009 3:47 pm
by hannah sillery
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

Buggy misc item collision

PostPosted: Mon Aug 10, 2009 10:03 am
by Sammi Jones
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.

Buggy misc item collision

PostPosted: Mon Aug 10, 2009 3:05 pm
by Destinyscharm
Did some experimental poking around, and it works great now. The box shape is alright. Thanks for the explanation. :)