Report as inappropriate.

Avatar-1940_thumb

Builderboy2005 presents ...

2009/3/20

Softbody Physics

Each line represents a spring, connected at points. You can move the object around with the arrow keys, see how it reacts to the world.

This could be expandabe to any object.

3372 views / 16 in the last 7 days

10 votes | 0 in the last 7 days

Tags: simulation physics with-source spring softbody

This scenario is a member of: Reusable actors & support classes


open in greenfoot
Your browser is ignoring the <APPLET> tag.
Aaaargh_thumbqnanqing

2009/3/21

no matter what is that.. that's great :D
Small_thumbmjrb4

2009/3/21

Brilliant!
Evil3_thumbNinto

2009/3/21

Very nice! \:
Evil3_thumbNinto

2009/3/21

Very very nice!! \: /:
Evil3_thumbNinto

2009/3/21

If you set the acceleration to 1 instead of 0.2 then will the box-thing be completely flat when it hit the wall! \:
Avatar-1940Builderboy2005

2009/3/21

Thanks!, When you set the acceleration that high, the force is great enough to press the box completely against the wall, and then all the forces are directed horizontal, so the box can't spring back easily.
No_avatar_thumbmbread

2009/6/21

Cool! Just goes to show some of the advanced things you can do with Greenfoot. Seeing some games making use of this would be great too.
AvatarDonaldDuck

2010/10/27

Another nice demo Builderboy. Say, I was considering making a "Jelly Car" like scenario. Would you mind if I use this as a starting point?
Avatar-1940_thumbBuilderboy2005

2010/10/27

Sure use all the code you need :D
AvatarDonaldDuck

2010/10/28

Thanks =D I was going over your code and I was just wondering (I'm no expert with doubles) if, instead of drawing the lines for the image, you could draw the lines onto the actor and move the actor itself... Just to clarify, instead of having double x as the X location on the image, I'm trying to make it so that it does something like setLocation(x, y) so that I can find if another actor intersects... I'm not great at explaining stuff like this, I'm only 13, so, it's not a wonder. Thanks again Builderboy.

See all comments

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

Who likes this?

Profile_picture_thumb Logo_thumb Avatar_thumb Canada-face-only-small_thumb No_avatar_thumb Aaaargh_thumb Evil3_thumb Small_thumb Humphreybogart-1_thumb No_avatar_thumb