[problem] Custom Collisions

Post » Sat Oct 17, 2009 7:19 pm

Hi, I have 2 Questions both on the same problem. I made an animated mesh with collision and some triggers to deal damage with spikes.

Maybe someone can figure out a mistake in the Niscope Settings.
The collision seemed to work fine, but dead creatures fall through the collision.
Nifscope Settings: http://s6b.directupload.net/file/d/2106/jau45chl_jpg.htm
The trigger doesnt always work, sometimes it does works though.
Nifscope Settings:http://s10.directupload.net/file/d/2106/2b99bkoq_jpg.htm

I guess that it is because of the collisions are both NiTriStripsShapes. For Triggers it would maybe always be better to use ConvexShapes (?), but then I would have to split the Trigger in a couple of subshapes as convex vertices. I have 5 of these Spike Meshes so I'd prefer to know if that works before I start :D

The other Collision (Non-Trigger) is working for living creatures, but when they die they fall through the collision. Maybe spiltting it up into Convex Shapes would also work here, but there are also many other meshes with NiTriStripsShapes and they dont have this problem.

I hope someone has an idea, thanks for reading,

sinHHHans
User avatar
Chloe Lou
 
Posts: 3476
Joined: Sat Nov 04, 2006 2:08 am

Post » Sat Oct 17, 2009 2:24 pm

Doesn't creature collision change significantly when the creature is dead. Like you can move the dead creature with spells or grabbing, but you can also walk right through them?
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Sat Oct 17, 2009 2:08 pm

The best mesh for you to look at is the :

"meshes\dungeons\fortruins\traps\rftrapspikes01.nif" in the Oblivion Data directory.

You'll see that it uses a convexshape collision with OL_TRAP collision layer for the spike parts. Like trigger collision, that nif uses that trap collision under a "phantom shape", so that the player can fall through and impale themselves on the spikes. Using scripting, you set the variables for the trap collision layer (there are specific functions and variables for traps), and then that collision will deal damage when something touches it. So I'd use multiple convex shapes to make the spikes' collision.

Trap variables (or can look at the script for above nif I pointed you to, in CS): http://cs.elderscrolls.com/constwiki/index.php/TrapUpdate

The stone looking nif with the holes in it: Look at the red-lined OL_STATIC collision part of the above sample nif mesh I pointed you to. I think your stone part needs to use similar settings as that nif.

Btw, which part of your mesh animates? The stone part or the spikes?

If you look at "meshes\dungeons\misc\dreamstairs01.nif", take note of the "Motion System", "Deactivator Type", "Solver Deactivation", & "Quality Type" in the bhkrigidbody of one of the moving stairsteps. Regardless of whether the spikes or the stone part moves, the "animated and moving" part of your nif needs to have those 4 settings the same as one of the moving stair steps in the dreamstairs01.nif. If your stone part moves, then then it should NOT use bhkBvMoppTreeShape collision nor bhkpackedNiTriStripsShape collision parts, but would also need multiple convexshapes or boxshapes, with OL_ANIM_STATIC layer.

bhkBvMoppsTreeShape causes animated things to have stuff fall through it, and bhkpackNitriStripsShape hurts performance more so. Convex, box, sphere, or capsule shapes are the best for animated/moving parts or even havoked items that are able to be manipulated in-game using the grab key.

Koniption
User avatar
Jessie
 
Posts: 3343
Joined: Sat Oct 14, 2006 2:54 am


Return to IV - Oblivion