google / liquidfun

2D physics engine for games

Home Page:http://google.github.io/liquidfun

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compacting list is a big problem

Leadwerks opened this issue · comments

We're running physics at a fixed rate and interpolating motion between the last two physics steps. For this reason we need the current and previous position of a particle, but the self-compacting list feature causes the particle indexes to become invalid. How can we persistently track a single particle?

b2ParticleSystem::GetParticleHandleFromIndex should work

Got it working, thanks.