How to get XY coordinate with distance and angle.

Stats

3,054 visits, 5,313 views

Translations

This tutorial hasn't been translated.

Tools

If you have used GameMaker, you might know this as lengthdir_x,y. This isn't available in Construct, but really its just a simple formula. For that reason, this tutorial will contend with being one of the shortest out there.

I recommend making a function with the following ACE:

What this calculates is the relative X or Y coordinates based on only the knowledge of how far and at what angle the point is. Add the returning number to your objects X or Y value to get the proper coordinates of your target.

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!