Skip to content

intercept_course

Vašek edited this page Feb 10, 2019 · 4 revisions

intercept_course

Returns the motion direction for the object to hit the target object

Syntax:

intercept_course(start, target, speed, targetSpeed, targetDirection)
Argument Description
Vector2 start Starting position of your object
Vector2 target Position of target object
float speed Speed of your object
float targetSpeed Speed of target object
float targetDirection Motion direction of target object

Returns: double

Description:

This function returns the motion direction for the object to hit the target object.

Example:

double value = intercept_course(Position, new Vector2(Position.X + 512, Position.Y), 10, 5, 90);

This function will set value to 30,000016.

Back to Raycasting

Clone this wiki locally