Fix part collisions
This commit is contained in:
@@ -202,8 +202,8 @@ void PartInstance::setSize(Vector3 newSize)
|
|||||||
|
|
||||||
size = Vector3(sizex, sizey, sizez);
|
size = Vector3(sizex, sizey, sizez);
|
||||||
|
|
||||||
|
g_dataModel->getEngine()->deleteBody(this);
|
||||||
|
g_dataModel->getEngine()->createBody(this);
|
||||||
}
|
}
|
||||||
Vector3 PartInstance::getSize()
|
Vector3 PartInstance::getSize()
|
||||||
{
|
{
|
||||||
@@ -224,6 +224,8 @@ void PartInstance::setShape(Enum::Shape::Value shape)
|
|||||||
this->shape = shape;
|
this->shape = shape;
|
||||||
this->setSize(this->getSize());
|
this->setSize(this->getSize());
|
||||||
}
|
}
|
||||||
|
g_dataModel->getEngine()->deleteBody(this);
|
||||||
|
g_dataModel->getEngine()->createBody(this);
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,6 +239,7 @@ void PartInstance::setAnchored(bool anchored)
|
|||||||
{
|
{
|
||||||
this->anchored = anchored;
|
this->anchored = anchored;
|
||||||
g_dataModel->getEngine()->deleteBody(this);
|
g_dataModel->getEngine()->deleteBody(this);
|
||||||
|
g_dataModel->getEngine()->createBody(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PartInstance::isAnchored()
|
bool PartInstance::isAnchored()
|
||||||
|
|||||||
Reference in New Issue
Block a user