Difference between revisions of "SetPosition - ObjectReference"
Jump to navigation
Jump to search
imported>JustinOther |
imported>DavidJCobb (→Notes: setmotiontype problem) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 27: | Line 27: | ||
== Notes== | == 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 [[PathToReference_-_Actor|PathToReference]] or [[ForceGreet (Procedure)|ForceGreet]]. | * 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 [[PathToReference_-_Actor|PathToReference]] or [[ForceGreet (Procedure)|ForceGreet]]. | ||
* All movement functions can cause [[SetMotionType - ObjectReference#Bugs|major issues]] when used on a reference that has had a [[SetMotionType - ObjectReference|motion type override]] applied. | |||
== See Also == | == See Also == | ||
Line 32: | Line 34: | ||
*[[GetPositionY - ObjectReference]] | *[[GetPositionY - ObjectReference]] | ||
*[[GetPositionZ - ObjectReference]] | *[[GetPositionZ - ObjectReference]] | ||
*[[PlaceAtMe - ObjectReference]] | |||
*[[MoveTo - ObjectReference]] | *[[MoveTo - ObjectReference]] | ||
*[[MoveToInteractionLocation - ObjectReference]] | *[[MoveToInteractionLocation - ObjectReference]] | ||
Line 37: | Line 40: | ||
*[[ObjectReference Script]] | *[[ObjectReference Script]] | ||
*[[PathToReference - Actor]] | *[[PathToReference - Actor]] | ||
*[[Spatial functions and snippets]] | |||
*[[Unit]] | *[[Unit]] |
Latest revision as of 21:04, 13 February 2016
Member of: ObjectReference Script
Sets the object's current position in the world.
Syntax[edit | edit source]
Function SetPosition(float afX, float afY, float afZ) native
Parameters[edit | edit source]
- afX: Position along the X axis.
- afY: Position along the Y axis.
- afZ: Position along the Z axis.
Return Value[edit | edit source]
None.
Examples[edit | edit source]
; Set the statue to be at the center of the world
StatueProperty.SetPosition(0.0, 0.0, 0.0)
Notes[edit | edit source]
- 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 PathToReference or ForceGreet.
- All movement functions can cause major issues when used on a reference that has had a motion type override applied.
See Also[edit | edit source]
- GetPositionX - ObjectReference
- GetPositionY - ObjectReference
- GetPositionZ - ObjectReference
- PlaceAtMe - ObjectReference
- MoveTo - ObjectReference
- MoveToInteractionLocation - ObjectReference
- MoveToMyEditorLocation - ObjectReference
- ObjectReference Script
- PathToReference - Actor
- Spatial functions and snippets
- Unit