Vec3Offset

native clearscope vector3 Vec3Offset(double x, double y, double z[, bool absolute]) const

Note: This feature is for ZScript only.

Usage

Calculates a 3D offset from the caller's current origin by the given amounts. This should be used over doing it manually since it is portal aware. Note that the values are not relative to the caller's current angle but are absolute. This function will not modify the calling Actor's position.

Parameters

  • x - The amount to offset by on the x axis
  • y - The amount to offset by on the y axis
  • z - The amount to offset by on the z axis
  • absolute - Default is false. If true, completely ignores portals.

Return value

Returns a Vector3 containing the new offset position.

Examples

Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.
This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.