Difference between revisions of "User:DavidJCobb/Rotation Library"
User:DavidJCobb/Rotation Library (edit)
Revision as of 14:47, 27 August 2020
, 14:47, 27 August 2020no edit summary
imported>DavidJCobb m (→Changelog: elaboration) |
imported>DavidJCobb |
||
Line 1: | Line 1: | ||
I've created a rotation library that makes it easier to work with rotation math in Skyrim. Among other things, it can position and rotate one object relative to another for you. [[User:DavidJCobb/Rotation Library Tutorial|This tutorial]] takes you through creating a basic demo of the library, and assumes that you've compiled the (interdependent) scripts below. | I've created a rotation library that makes it easier to work with rotation math in Skyrim. Among other things, it can position and rotate one object relative to another for you. [[User:DavidJCobb/Rotation Library Tutorial|This tutorial]] takes you through creating a basic demo of the library, and assumes that you've compiled the (interdependent) scripts below. | ||
Please use different [[Scriptname|script names]] if you choose to use these libraries, so as to avoid collisions with any edits or enhancements that other users may make in other mods. You should probably strip out all of the Debug.Trace() statements as well. | Please use different [[Scriptname|script names]] if you choose to use these libraries, so as to avoid collisions with any edits or enhancements that other users may make in other mods. You should probably strip out all of the Debug.Trace() statements as well. This code is freely usable. | ||
The relative-position code was adapted from [[Spatial functions and snippets#Rotation matrix|code originally written by Chesko]]. | The relative-position code was adapted from [[Spatial functions and snippets#Rotation matrix|code originally written by Chesko]]. | ||
Other editors: feel free to add this to whatever Papyrus categories you feel are relevant. :) | Other editors: feel free to add this to whatever Papyrus categories you feel are relevant. :) | ||
EDIT AUGUST 2020: The below code does ''work'', but it's wrong about one detail: Skyrim uses extrinsic XYZ rotations, not ZYX. Of course, so does this code! Apparently I got the conventions wrong over half a decade ago, and I'm only revisiting the whole thing now, so now's when I noticed. | |||
== Changelog == | == Changelog == |