Background for Skyrim SE
Member of the ObjectReference script
voidfunctionTranslateTo(floatafX, floatafY, floatafZ, floatafXAngle, floatafYAngle, floatafZAngle, floatafSpeed, floatafMaxRotationSpeed=0.0)Native

[DEV SERVER] Loading description...


Caveats

CK Wiki - Notes

  • The movement speed is in units per second.
  • The rotation speed is in degrees per second.
  • afMaxRotationSpeed equal to 0 means that the object will reach the target rotation when it reaches the target position.
  • It is not possible to cause the object to rotate faster than it would with afMaxRotationSpeed equal to 0. (Cannot reach target rotation before target position.)
  • The OnTranslationComplete event will fire when the object reaches both the target position and target rotation.
  • The OnTranslationAlmostComplete event can fire even when the target rotation is far from being reached.

Parameters

floatafX

CK Wiki Description

Position along the X axis (Absolute world coordinates).

floatafY

CK Wiki Description

Position along the Y axis (Absolute world coordinates).

floatafZ

CK Wiki Description

Position along the Z axis (Absolute world coordinates).

floatafXAngle

CK Wiki Description

Destination X Angle (Absolute world rotation).

floatafYAngle

CK Wiki Description

Destination Y Angle (Absolute world rotation) (rarely used).

floatafZAngle

CK Wiki Description

Destination Z Angle (Absolute world rotation).

floatafSpeed

CK Wiki Description

Movement Speed.

floatafMaxRotationSpeed=0.0

CK Wiki Description

Maximum rotation Speed (default is 0 to mean "don't clamp the rotation speed") - Negative values cause unpredictable rotation.


Examples

; Translate the bird slowly to 0,0,0 with a rotation of 90,90,90
Bird.TranslateTo(0.0, 0.0, 0.0, 90.0, 90.0, 90.0, 1.0)
; Translate the bird slowly to 0,0,0 with a rotation of 90,90,90 with a max rotation speed of 10
Bird.TranslateTo(0.0, 0.0, 0.0, 90.0, 90.0, 90.0, 1.0, 10.0)

Auto-Generated Example

float myFloat__afX
float myFloat__afY
float myFloat__afZ
float myFloat__afXAngle
float myFloat__afYAngle
float myFloat__afZAngle
float myFloat__afSpeed
float myFloat__afMaxRotationSpeed

myObjectReference__toCallFunctionOn.TranslateTo(myFloat__afX, myFloat__afY, myFloat__afZ, myFloat__afXAngle, myFloat__afYAngle, myFloat__afZAngle, myFloat__afSpeed, myFloat__afMaxRotationSpeed)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.