Modding, Mission Design, and Coding > Test Builds

Submodel rotation upgrade test builds


TLDR: Submodels can now rotate on any axis.  Model code has been optimized; model rendering and collision should now be faster.  This feature, plus m!m's action system feature, will be used for the animation system upgrade after the next official release.

This is a rather substantial rewrite/refactor of the submodel rotation code. Submodel rotation is now tracked via an axis-angle representation, which is used to calculate a matrix to represent the submodel orientation in the model instance. The axis can be any vector, not limited to the standard X, Y, and Z vectors.

The submodel orientation is now used for position calculation in almost every place the submodel angles were previously used. In conjunction with the simplification of KeldorKatarn's code, this saves a significant number of calculations for every movable submodel in every frame. Hopefully this should lead to a measurable speedup in both rendering and collision detection.

To change the rotation axis of a submodel, add the $rotation_axis: property as specified in the wiki.

Test builds can be downloaded here.

This is very exciting. FotG will definitely be taking advantage of this to improve our s-foil rotations.

It just occurred to me that this will also make it possible to have turrets on rotating submodels. :pimp:

That is to say, this PR is 99% of the way there.  The only thing needed is a proper field-of-view calculation.


[0] Message Index

Go to full version