Jump to content

SetPos and Statics


fg109

Recommended Posts

For some (most?) statics, using SetPos on them doesn't update their collision. You have to call Update3D or else move them to another cell and bring them back in order for their collision to work properly.

 

Well I was trying to learn some simple object animation when I found by changing a few settings on the statics' collision, their collision would update when SetPos was used. Or at least that's how it was for a couple of ship parts I was messing around with.

 

For example, the BloatedFloat01.nif. I imported it into Blender and selected the collision meshes. In the Buttons Window, I went into the Logic Panel and deleted all the information under the Add Property button, except for the topmost info on the Havok Material. Then I selected the drop down menu that was currently showing "No collision" and changed it to "Rigid body". I also made sure that "Triangle Mesh" was selected for the bounds.

 

Then I just exported the nif but with the BSX flag changed to 11. That was all I did and I got the collision to update when using SetPos.

 

Looking at the changes in Blender and checking out the properties for the collision, these were the changes:

 

OblivionLayer: changed from Static to AnimStatic

QualityType: changed from Fixed to Keyframed

MotionSystem: changed from Fixed to Keyframed

 

There were also some changes in the mass, but I don't think that's relevant.

 

I've never seen this info anywhere, so I thought I'd post it.

Link to comment
Share on other sites

Yes, depending on some mesh attributes, the collision moves with the visuals.

The vanilla activator ARGate01 is an example.

 

I am no modeler and asked around about it a couple of years ago and JDFan figured it out. I saved his reply (although it sounds Greek to me):

..::sinHHHans::.. also had something to say;

 

Is still early in testing but easy way to test is open your model in nifskope - in another instance open the Dungeons\AyeleidRUins\interiors\ARGATE01.nif go to the 24 bhkCollisionObject and do a Block - Copy Branch.

 

Go back to your model click on the Ninode that contains your model and do a Block - Paste Branch (notice the # that the pasted branch is given). Then go back to the Ninode of your model and hilight it (Usually the O Ninode) and in the Block Details find the collision object LINE double click to open for editing and enter the # the pasted bhkcollisionobject was given (this sets our collision box as the models collision replacing the collision that was there ) now delete the old collision branch (it should be at the bottom of the Nif since it is now unparented) and go into the new bhkcollisionobject sub branch to the bhkBoxShape line and in block details adjust the size of the square to fit your model. (will need to test some more objects in order to find the settings that make it work so those settings can be copied over to new models instead of doing it this way - so that other shapes can be used instead of just simple blocks !! - but this is at least a start !

 

 

 

You can also avoid this disable, enable thingy by changing the Collision type in the nif file of the object to AnimStatic or Clutter. But be sure you set all values like in another AnimStatic or Clutter object.(Open Nifscope twice and campare, especially the Motion Type, the Quality Type and the two unknown bytes in between seem to be the important thing here. Of course also the "Layer" and the LayerCopy have to be set to either Clutter or AnimStatic.) These values are all in the bhkRigidBody(T) of the mesh.

Link to comment
Share on other sites

I wish I had seen that information last week. :sad:

 

A couple days ago someone on the mod request forum asked about an airship that you could walk around on while flying. I had a hard time getting it to look and work reasonably well.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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