Description
Wiki Description
Sets the object's current position in the world.
Documentation Comment
Set the position of the object
Caveats
CK Wiki - Notes
- SetPosition() should be avoided for placing other actors in sight of the player, as they will suddenly appear in an unrealistic way. Instead, consider placing them nearby but out of sight, and making them approach the player themselves, using Actor.PathToReference(...) or ForceGreet.
- All movement functions can cause ObjectReference.SetMotionType(...) when used on a reference that has had a ObjectReference.SetMotionType(...) applied.
Parameters
floatafX
CK Wiki Description
Position along the X axis.
floatafY
CK Wiki Description
Position along the Y axis.
floatafZ
CK Wiki Description
Position along the Z axis.
Examples
; Set the statue to be at the center of the world
StatueProperty.SetPosition(0.0, 0.0, 0.0)Auto-Generated Example
float myFloat__afX
float myFloat__afY
float myFloat__afZ
myObjectReference__toCallFunctionOn.SetPosition(myFloat__afX, myFloat__afY, myFloat__afZ)Related Pages
- ObjectReference.GetPositionX()
- ObjectReference.GetPositionY()
- ObjectReference.GetPositionZ()
- ObjectReference.PlaceAtMe(...)
- ObjectReference.MoveTo(...)
- ObjectReference.MoveToInteractionLocation(...)
- ObjectReference.MoveToMyEditorLocation()
- ObjectReference
- Actor.PathToReference(...)
- Spatial functions and snippets
- Unit
