Discuss Scratch

-mage
New to Scratch
59 posts

pen

anyone know fast detection methods of collision? (no AABB or SAT collision, I know those already) I am looking for optimized fast methods of detecting collisions between objects
BigNate469
Scratcher
1000+ posts

pen

You can find the slope of a line and use trig to align it with an axis and rotate everything else (also using trig) accordingly and then using standard AABB-style checks, and rotate it back before you render it.
You can also use some algebra to check for the points where a line will intersect.

Highlight any part of this signature and press ctrl+shift+down arrow to see the rest of it.
For information on a signiture, including how to make one, visit here.
Please read the list of Officially Rejected Suggestions before posting a suggestion for Scratch!
View all of the topics you've posted in:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=topics
View all of your posts:
https://scratch.mit.edu/discuss/search/?action=show_user&show_as=posts
Lesser-known Scratch URLs:
https://scratch.mit.edu/projects/PROJECT ID HERE/remixtree (replace “PROJECT ID HERE” with project id number. Shows all the remixes of the project, and the remixes of those projects, and the remixes of those projects, and so on, as a chart. Link currently redirects to one of my projects). There was a button on the project page linking to this in 2.0, but it was removed.
View a larger list at: https://scratch.mit.edu/discuss/topic/542480/
Why @Paddle2See's responses are so often identical: https://scratch.mit.edu/discuss/topic/762351/
1000th post

The devs really need to update the scratch-gui repo- I'm getting at least 19 “npm warn deprecated” warnings whenever I try to install its dependencies, and yes, I'm using the latest version of node.js and npm. Then again, the dev page on this website and the wiki in the repo still refer to Scratch 3.0 in beta, and link the current website as an example of 2.0.
-mage
New to Scratch
59 posts

pen

BigNate469 wrote:

You can find the slope of a line and use trig to align it with an axis and rotate everything else (also using trig) accordingly and then using standard AABB-style checks, and rotate it back before you render it.
You can also use some algebra to check for the points where a line will intersect.
i have tried doing that and using rotation matrixes to create the new points but using the trigonometric operators is quite computationally expensive and slow also this is pretty much what SAT does, but more efficiently but sadly it's still slow
-mage
New to Scratch
59 posts

pen

also this is for pen projects so i cant use touching bloks
<touching [ v]>
<touching color [#ed7866] ?>
<color [#6eee92] is touching [#370d47] ?>

Powered by DjangoBB