object still colliding after being removed from space
Posted: Wed Apr 21, 2010 8:19 am
I created a StaticTriangleGroup from a Model like this:
then added it to the scene:
But when i remove it later: m_space.remove(floorPhysics), I realise that other objects are still colliding with it. Is this a bug, or am I doing something wrong? I do not encounter this problem when i use a Box instead of a StaticTriangleGroup.
Code: Select all
public StaticTriangleGroup CreateStaticEntityFromModel(Model model)
{
StaticTriangleGroup.StaticTriangleGroupVertex[] vertices;
int[] indices;
StaticTriangleGroup.getVerticesAndIndicesFromModel(model, out vertices, out indices);
TriangleMesh triangleMesh = new TriangleMesh(vertices, indices);
StaticTriangleGroup triangleGroup = new StaticTriangleGroup(triangleMesh);
return triangleGroup;
}
Code: Select all
floorPhysics = CreateStaticEntityFromModel(mdl_levelModel);
m_space.add(floorPhysics );