vrld / HC

General purpose collision detection library for the use with LÖVE.
http://hc.readthedocs.org/
404 stars 48 forks source link

Shape removal doesn't seem to be working #27

Closed jbrower closed 8 years ago

jbrower commented 11 years ago

I'm trying to remove some shapes. I create the shape using

self.collShape = Collider:addCircle(self.x, self.y, self.radius)

and can add it to collision groups by doing

Collider:addToGroup("enemies", self.collShape)

The problem is when I want to remove the collision shape I try to do

Collider:remove(self.collShape)

and it doesn't seem to have any effect.

Am I doing something wrong?

jbrower commented 11 years ago

As an additional piece of information. It seems like it eventually does "remove" the shape, but for 30 or 40 frames after the shape has been removed, the collide() callbacks are still being hit. Also, shape:draw() still draws the shape even after collision callbacks are no longer being called, is that the expected behavior?

vrld commented 8 years ago

Not relevant anymore