Spatial functions and snippets: Difference between revisions

Jump to navigation Jump to search
m
Convert source tags to syntaxhighlight
imported>Perdev
mNo edit summary
m (Convert source tags to syntaxhighlight)
Line 5: Line 5:
This code is useful if you want to compute the position that results from a translation from an origin, then a rotation around that origin. This is useful if, for example, you want to place something on an "orbit" around another object. It was [http://forums.bethsoft.com/topic/1422115-can-a-script-create-multiple-objects-in-a-fixed-position/page__view__findpost__p__21771549 created by Chesko].
This code is useful if you want to compute the position that results from a translation from an origin, then a rotation around that origin. This is useful if, for example, you want to place something on an "orbit" around another object. It was [http://forums.bethsoft.com/topic/1422115-can-a-script-create-multiple-objects-in-a-fixed-position/page__view__findpost__p__21771549 created by Chesko].


<source lang="papyrus">;-----------\
<syntaxhighlight lang="papyrus">;-----------\
;Description \ Author: Chesko
;Description \ Author: Chesko
;----------------------------------------------------------------
;----------------------------------------------------------------
Line 83: Line 83:
         return fNewPos
         return fNewPos
endFunction
endFunction
</source>
</syntaxhighlight>


You may have to modify it to suit your needs.
You may have to modify it to suit your needs.

Navigation menu