jhavl / swift

MIT License
92 stars 22 forks source link

bugfix - do not update the deleted items on env.step() #49

Open askuric opened 1 year ago

askuric commented 1 year ago

Hi @jhavl,

This is a quick PR. I've stumbled upon a problem when I add a mesh file to the environment and remove it later on.

...
env.add(poly_mesh)
...
env.remove(poly_mesh)
...
env.step()

basically the for loop inisde the env.step() does not check if the object has been deleted or not. So I've added it. With this change the above code work properly.

KuabeM commented 1 year ago

Stumbled upon the same issue and tested this fix. Works for me!