'Is it posssible to find an x/y coordinate without Angles? i need this for a target locator in a Scratch Program
My scratch project:https://scratch.mit.edu/projects/657133771
i need a triangulation/trilateralation equation for a target locator. otherwise the tank is just stupid.
Solution 1:[1]
Try using the Distance Formula (Pythagorean Theorem) to calculate the distance between points. Simply use:
distance = sqrt( (x2-x1)^2 + (y2-y1)^2 )
Solution 2:[2]
Make the x and y change at the same time. It will give an angle effect, and your sprite does not have to turn. Not exactly a formula, but if you match up the x and y changes in the right way, you get different angles.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 |