Skip to main content
GameDev.net gamedev.net
🔒 Locked

Trampoline

Started by Ozymandias43 Jun 18, 2007 at 3:24 PM 0 replies 1.2k views
Original Post
Ozymandias43
Ozymandias43
I'm writing a small game that is mostly lots of rigid body physics. It's basically two guys with very destructible bases made out of blocks that fire cannonballs at each other. Lots of fun. I've been using ODE for the physics, which has been working great for me so far. I wanted to add an object that could reflect or catch incoming cannonballs, probably cloth-like trampolines and nets. I'm not sure how to handle this correctly with a rigid body physics engine (anyone want to recommend a free alternative that can handle a bouncy surface?). What has worked best so far is creating a large mesh of roughly 30x30 small cubes that represent the surface. These objects are attached to their above, below, left, and right neighbors with a springy joint. This worked surprisingly well, but it could use a lot of improvement. Any ideas or suggestions?
Numsgil
Numsgil
Springs are definately going to be the most useful objects for you. Are you looking for something to bounce the cannonball backwards or something to catch the cannonball and hold it?

Either way, I think that a large spring mesh (dozens of cubes or spheres connected by springs) is going to be the way to go. You'll want to watch out for numerical instabilities with the springs, though, so keep the spring constants and damping constants low.
[size=2]Darwinbots - [size=2]Artificial life simulation

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.