Vec3To

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


native clearscope vector3 Vec3To(Actor other) const

Usage

Gets a 3D vector that points in the direction from the caller to other. This should be used over doing it manually since it will take sector portals into account. This is calculated from the caller's origin (the bottom middle of the Actor) to other's origin.

Parameters

  • other - The Actor to point the vector towards

Return value

Returns a Vector3 pointing towards other with a magnitude matching the distance between the caller and other.

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.