Jump to content

need help with collision/havok for custom movable object


Hoamaii

Recommended Posts

Hi guys,

 

Still struggling with that: I created a movable version of the Vanilla bedroll, I made it an activator because i need it to be movable and attach a script to it.

 

The collision I'm using is the Vanilla one, it's a bhkCompressedMeshShape, and the RigidBody, I made it a bhkRigidBodyT.

 

So far, it fills my main purpose which is to have collision move around with the mesh:

 

1. when grabbed, moved around and released some place else, the collision and world coordinates update properly. I can call getPosition thru script and it IS reliable.

 

2. when dropped on slanted ground, it will match the slant of the slope instead of lay horizontal (yeah!) - again getPosition is reliable here too.

 

 

BUT I've been facing another issue which I can't quite solve satisfyingly so far: when released from grab, the object will occasionally either SINK underground or TILT badly with one side of it half buried instead of dropping flat. I've tried many things to avoid this but nothing much worked perfectly. I does not happen everywhere, but often enough to be a problem. The best I could do was reduce a bit the occurences of sinking or tilting 'accidents'.

 

The best Nifskope settings I've come up with so far are:

 

- collision layer: OL_WEAPON (OL_PROPS works too but not as good - and OL_CLUTTER makes it a nightmare)

- motion system: MO_SYS_SPHERE_INERTIA (MO_SYS_BOX or _STABILIZED for some reason do not update the object's world coordinates when moved around)

- deactivator type: DEACTIVATOR_NEVER

- solver Deactivation: MO_QUAL_CRITICAL (more stable than MO_QUAL_MOVING)

 

Col Filer : Flag 0 - that one I have no idea what it does!.. but it's the same as for props or armor ground items (which usually do not sink!)

 

Mass: 15.000 (below that it bounces around - above that, it sinks almost everytime underground)

 

Linear Damping: 1.5

Angular Damping: 1.5 - again, below that it will sink more, above that, it tilts more.

 

Intertia Tensors: I set m11, m22 and m 33 all to the same value of 1.0 (higher values make it sink faster - lower values make it flip around!)

 

Restitution: 0 - that helped stabilize it a bit - it almost stopped it from flipping around at all when manipulated.

 

And finally, I set Havok material to SKY_HAV_MAT_LIGHT_WOOD - can't remember all the ones I've tried but this ended up to be the best 'stable' choice again.

 

Other settings I did not change because I have no idea waht they do.

 

 

I realize I ask that object a lot: that it be movable, that collision coordinates get updated when moved, that it matches ground slant when released, that it does not filp around when moved onGrab AND that it does not sink underground nor tilt when released to the ground.

 

I believe it's a fine balance to find between all those settings where collision settings, havok material, and mass are critical - and possibly the fact that this object (bedroll) is fairly spread out and flat doesn't help.

 

Could any of you guys who's more at ease with nifs and collision than I am help me solve that issues?

 

 

Many thanks in advance :smile:.

 

Cheers to all!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...