找到没有角度的X/Y坐标可能是可能的吗?我需要在划痕程序中的目标定位器

发布于 2025-01-17 13:09:43 字数 178 浏览 3 评论 0原文

我的临时项目:https://scratch.mit.edu/projects/657133771

我需要一个目标定位器的三角测量/三边方程。否则坦克就是愚蠢的。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

一笑百媚生 2025-01-24 13:09:43

尝试使用距离公式(毕达哥拉斯定理)来计算点之间的距离。只需使用:
距离公式

距离 = sqrt( (x2-x1)^2 + (y2-y1)^2 )

Try using the Distance Formula (Pythagorean Theorem) to calculate the distance between points. Simply use:
distance formulat

distance = sqrt( (x2-x1)^2 + (y2-y1)^2 )

绝不放开 2025-01-24 13:09:43

使x和y同时改变。它会产生角度效果,并且你的精灵不必转动。不完全是一个公式,但如果你以正确的方式匹配 x 和 y 的变化,你会得到不同的角度。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文