Implement NiBillboardNode flags (#3602)
Closes #3602 (closed)
This replaces the callback with a customized Frankenstein's monster inspired by osg::AutoTransform and based on NifOsg::MatrixTransform. Deriving the class from MatrixTransform is necessary to theoretically support animations without suffering from headaches and doing the cursed "transform + cool node" chaining. Rotate about Z rotates around the object's local Z, rigid face camera mode is inverted on camera Z compared to master but looks the same, while Always Face Camera... Well, you can read about it in the issue, I can't really explain what it does
osg::AutoTransform does not have modes that are relevant to us after all.
Examples B and C in Kurp's test level are ROTATE_ABOUT_UP demonstrations. Note how the trees rotate around a single axis. Example D and later are ALWAYS_FACE_CAMERA which was implemented as RIGID_FACE_CAMERA at the time this was recorded, i.e. the classic behavior everyone is familiar with. In master, B and C look the same as D.
This had minimal testing from my side and was submitted to get early opinions, need to get/produce more examples (particularly animated examples). I think the fundamentals are sound and this is very close.
- I'm unsure how to handle paging or how it's currently handled in general. Current resolution: use the neutral pose
- This is an existing issue, but collision shapes should maybe be animated (verify). Resolution: naive approach causes problems, let's say this is a known issue.
- Morrowind's Rigid Face Camera facing direction seems to be inverted.
Resolution: it's inconsistent about this, in some cases master orientation is fine, so keeping master behavior for this mode isn't the end of the world.I was accidentally testing the other face camera mode, it is consistent after all. - Need to finish and push Always Face Camera