Difference between revisions of "Talk:GetAngleZ - ObjectReference"
Jump to navigation
Jump to search
m
Talk:GetAngleZ - ObjectReference (edit)
Revision as of 01:22, 8 December 2020
, 01:22, 8 December 2020→Place objects in the direction you are looking
imported>Sein schatten (Created page with "== Place objects in the direction you are looking == <source lang="papyrus"> float GameX = PlayerRef.GetAngleX() float GameZ = PlayerRef.GetAngleZ() float AngleX = 90 + GameX...") |
imported>Sein schatten |
||
Line 11: | Line 11: | ||
endIf | endIf | ||
ObjectYouWant.MoveTo(PlayerRef, DistanceVar * Math.Sin(AngleX) * Math.Cos(AngleZ), DistanceVar * Math.Sin(AngleX) * Math.Sin(AngleZ), DistanceVar * Math.Cos(AngleX)) ;We might want to add a float equal to the actor's height - 35 to raise the object to roughly chest level. If you will do this, add it to the Z offset parameter. | ObjectYouWant.MoveTo(PlayerRef, DistanceVar * Math.Sin(AngleX) * Math.Cos(AngleZ), DistanceVar * Math.Sin(AngleX) * Math.Sin(AngleZ), DistanceVar * Math.Cos(AngleX)) ;We might want to add a float equal to the actor's height - 35 to raise the object to roughly chest level. If you will do this, add it to the Z offset parameter. | ||
<source> | </source> | ||
Source: https://www.reddit.com/r/skyrimmods/comments/k8nvb3/some_calculus_that_can_help_modders_with_moveto/ | Source: https://www.reddit.com/r/skyrimmods/comments/k8nvb3/some_calculus_that_can_help_modders_with_moveto/ |