This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

MTK
MTK presents ...

2009/10/29

2d-rigid-physics-engine

This is a still unfinished rigid body physics engine.

As for now I have implemented the ability to apply forces to arbitrary points on the object and to bounce off walls.

I will later try handling object-object collisions, once I figure out collision detection.

It right now detects floor collisions, but I don't think they're right.

Anyway, in this stage you can thrust around the block by the red dot using the IJKL keys, and try to slam it against the walls to see it bounce.

And I am developing this in GNU/Linux :)

UPDATE: Fully implemented wall collisions with rotation!

4112 views / 4 in the last 7 days

6 votes | 0 in the last 7 days

Tags: simulation physics demo with-source rigid body

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Thu Oct 29 20:56:22 UTC 2009
A new version of this scenario was uploaded on Sun Nov 01 17:22:22 UTC 2009
MTKMTK

2009/11/2

I decided do do a little rewrite of this because the code was getting messy, and I thought I could take more advantage of Java's polymorphism, I might post it soon. But I am still having a hard time finding a good explanation of the physics involved...
Jamit4meJamit4me

2010/12/2

Your two rigid body physics engines are pretty impressive. Cool stuff!

Want to leave a comment? You must first log in.

Who likes this?

chamuzi3 JavaForever dangjavageek darkmist255 qnanqing Jamit4me