Difference between revisions of "Talk:TranslateTo - ObjectReference"

Jump to navigation Jump to search
imported>Terra Nova2
imported>Jaxonz
Line 69: Line 69:
</source>
</source>
This is interchangable. CasterActor can be replaced with TargetActor(as well as for the GetPos functions). You'll slam into the target, but you'll notice collision has returned. Why this works, I cannot explain, it may involve some internal mechanics I'm not familiar with. This was tested in an exterior, though it should in theory work in interiors but the problem with collision lost during translation will be a lot more noticable. I think this is about as close as I will get to solving this mystery. Oh and this method should work outside of a magic effect script. Will '''not''' work with [[TranslateToRef - ObjectReference|TranslateToRef]]. Untested with the other flavors of translation functions. [[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-03-19T11:12:40 (EDT)
This is interchangable. CasterActor can be replaced with TargetActor(as well as for the GetPos functions). You'll slam into the target, but you'll notice collision has returned. Why this works, I cannot explain, it may involve some internal mechanics I'm not familiar with. This was tested in an exterior, though it should in theory work in interiors but the problem with collision lost during translation will be a lot more noticable. I think this is about as close as I will get to solving this mystery. Oh and this method should work outside of a magic effect script. Will '''not''' work with [[TranslateToRef - ObjectReference|TranslateToRef]]. Untested with the other flavors of translation functions. [[User:Terra Nova2|Terra Nova2]] ([[User talk:Terra Nova2|talk]]) 2014-03-19T11:12:40 (EDT)
== Global and Object-Relative Angles ==
The description of the TranslateTo function states that afAngleX, afAngleY, and afAngleZ are absolute world rotations.
Experimentally, it has been determined that only afAngleX is absolute world rotations, whereas afAngleY and afAngleZ are relative to the object being positioned.
As an example, suppose you are manipulating a bucket object which has the Z-axis extending up through it's center:
objBucket.TranslateTo(objBucket.X, objBucket.Y, objBucket.Z, objBucket.GetAngleX(), objBucket.GetAngleY, objBucket.GetAngleZ + 90.0, 1.0, 1.0)
Will cause the bucket to rotate about its own Z axis, regardless of the value of the other angles.
afAngleY is likewise relative to the object itself, however afAngleX does use world absolute angles. It is uncertain why this inconsistency exists.
Anonymous user

Navigation menu