VelIntercept

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


native void VelIntercept (Actor targ [, double speed [, bool aimpitch [, bool oldvel [, bool resetvel]]]])

Usage

Aims the caller at the target and takes the target's velocity into account when doing so. This can be used to spawn a missile that will predict where its target is going instead of aiming directly at the target.

Parameters

  • targ: The actor to aim at.
  • speed: Can be used to adjust the speed of the caller after aiming. Default is -1, which tells GZDoom to use the actor's speed property.
  • aimpitch: If false, the pitch on the caller will not be set after aiming. Default is true.
  • oldvel: If true, the velocity (both speed and direction) will not change, only the caller's angle and potentially pitch. Default is false.
  • resetvel: Default is false.

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.