Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

request: Add distance block for checking if sprites are near each other #6485

Open
spaceunifyfifty opened this issue Jul 22, 2024 · 1 comment

Comments

@spaceunifyfifty
Copy link

spaceunifyfifty commented Jul 22, 2024

I spent a few minutes looking and surprisingly could not find any block that provide the distance formula / Pythagorean theorem to check how far away sprites are from each other easily, analogous to how scratch provides distanceTo.

I would expect this to be included on a platform designed to teaching children programming through 2d games. Sure, I could dedicate an entire lesson to teaching how the pythagorean works, or manually check the differences betwen player.x - other.x < threshold and .... But for some children that is just too complicated to teach at the moment or too many steps to keep in their head at once, and serves as a conceptual roadblock in lessons, when they otherwise would be able to follow the rest of the gameplay logic just fine.

I would rather not define my own function for this. It is reasonable for it to be builtin.

@spaceunifyfifty spaceunifyfifty changed the title Add distance block for checking if sprites are near each other request: Add distance block for checking if sprites are near each other Jul 22, 2024
@sae220
Copy link

sae220 commented Jul 24, 2024

@spaceunifyfifty
You can use the extension https://github.com/jwunderl/arcade-sprite-util for now.

@abchatra abchatra transferred this issue from microsoft/pxt Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants