Basic physics engine

I made a basic physics engine for fun.
-I’m currently adding object rotation and more collision, as well as more objects: WIP

Here’s the link: Physics engine v1.0 by mrace0 | Snap! Build Your Own Blocks
Any feedback would be appreciated

Its good.. Just a bit, rotation. A lot of it.

Cool! Sometimes the cube doesn’t rotate to a flat edge and stays floating at an angle:

I’m currently fixing this problem, as well as adding more angular velocity and movement physics to make this a bit more accurate. After the heavy lifting is done I will start making more shapes and interact-able objects

-Fixed it!

here, you will need this dot product block for the collisions
mathBlocks script pic

Thank you very much! It works well. Although I may be misunderstanding what I am supposed to use this for, considering I have a
(number) x (number)

it makes it to where you don’t have to place an add block and a multiply block everytime you wanna do a dot product

Ah! Thank you for that fascinating info!

May I please port fragments of your code to my collaboration?

You said:

Also, you should store some of your code inside custom blocks since the instant I selected one of the sprites, it was not just the IDE that flashed white, but my browser too. Well, actually, that only happened because I was trying to examine the code while it is running, but it took almost 3 seconds to switch sprites.

Absolutely! I wouldn’t mind, I added comments as to what everything does for your convenience.

That’s a common mistake I do as well, (swapping while the scripts running) I’ll try getting right to that!

Really nice!

What I like!
  1. I can move around the objects
  2. If you drag them too fast in one direction the momentum will make you De-Latch (?) the object you are holding.2.
What can be added
  1. A menu where you can choose between a variety of different objects.

  2. I can’t think of any more lol…

You actually read my mind, I was planning on making this a game, where you can create blocks from a menu and set the conditions. As well as “pull strength” and interact-able blocks that bounce other blocks and whatnot.

Yep, thats one of my many talents!

Wow! Can’t wait!