I am making a 2D gravity shooter, and not
sure how to integrate pixel-perfect collision
(a terrain) into a simulation.
I read that a collider could be plugged into ode.
How can this be done?
The terrain images the game generates are quite large
(max. 2048*2048), so I welcome optimization ideas too:)
Thanks very-very much in advance for any help.
From: Chris Bainbridge <chris.bainbridge@gm...> - 2007-02-22 17:26:11
On 21/02/07, Andr=E1s =C1cs <a.acs@...> wrote:
> I am making a 2D gravity shooter, and not
> sure how to integrate pixel-perfect collision
> (a terrain) into a simulation.
> I read that a collider could be plugged into ode.
> How can this be done?
I assume you have a collision detector that detects ODE geoms
penetrating your terrain? If so, all you need to do is to call this
collider to generate contacts, then convert them into ode.Contact
instances, then for each of those create an ode.ContactJoint and
attach it to the penetrating Geom. But that's relatively easy, the
hard part is writing the collision detector. If you don't have one,
you'll need to figure out how to detect contacts and contact direction
etc. between whatever terrain model you're using and each ODE Geom.
Get latest updates about Open Source Projects, Conferences and News.