NiAVObjectSetCollisionMode

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

This is a command from NifSE.

Syntax

(bool:success) NiAVObjectSetCollisionMode short:collMode short:nifID short:blockID
(bool:success) NiAVObjSetCollMode short:nifID short:blockID

Sets the collision mode of the NiAVObject-derived specified by the blockID. Collision modes are indicated with integers between 0 and 3, as detailed below. Returns true if successful; false otherwise.

Collision Modes[edit | edit source]

0   None - the object has no collision
1   Triangles - will use the triangles of the NiAVObject itself
2   Bounding Box - will use the included bounding box
3   Continue - will use collision defined lower in the scene graph

Note[edit | edit source]

  • The correct value for Oblivion meshes seems to be 3. In the Game of the Year edition, meshes use 0 instead. Use of 1 or 2 has not been seen in Bethesda-made Oblivion meshes; it is unclear if Oblivion uses them. Oblivion meshes can certainly have collision even if the collision mode is set to 0.

See Also[edit | edit source]