Vec3Angle

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


native clearscope vector3 Vec3Angle(double length, double angle[, double z[, bool absolute]]) const

Usage

Calculates a 3D offset from the caller's current origin in the given direction. This should be used over doing it manually since it is portal aware. This function will not modify the calling Actor's position.

Parameters

  • length - The distance to offset by
  • angle - The direction to offset
  • z - Default is 0. 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

Nuvolachalk.png 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.