Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Support NiSwitchNode #2141
Implements feature #4812.
In upstream master we handle the NiSwitchNode as a common NiNode (render all children), while vanilla Morrowind renders just its first child (and MGE improves its loading, so it is possible to switch between its children).
This PR creates an osg::Switch for every NiSwitchNode, so it is possible so set current active child:
By default only first children is rendered.
Note: autogenerated collisions still will be based on all node children in both Morrowind and OpenMW, so it is recommended to use either NiRootCollisionNode or NCO for such meshes.
Switch nodes will allow us to implement some extended features (such as native herbalism or glowing windows) and it does not matter if they will be hardcoded or handled via Lua scripting with scene graph access (probably based on existing Lua bindings for OpenSceneGraph).