mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 09:48:44 +02:00
Fix collision hull not necessarily being updated when model URL changed
This commit is contained in:
parent
06f7624512
commit
2222f8f4f6
1 changed files with 2 additions and 2 deletions
|
@ -425,12 +425,12 @@ void PhysicalEntitySimulation::buildPhysicsTransaction(PhysicsEngine::Transactio
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool needsNewShape = object->needsNewShape();
|
bool needsNewShape = object->needsNewShape() && object->_entity->isReadyToComputeShape();
|
||||||
if (needsNewShape) {
|
if (needsNewShape) {
|
||||||
ShapeType shapeType = object->getShapeType();
|
ShapeType shapeType = object->getShapeType();
|
||||||
if (shapeType == SHAPE_TYPE_STATIC_MESH) {
|
if (shapeType == SHAPE_TYPE_STATIC_MESH) {
|
||||||
ShapeRequest shapeRequest(object->_entity);
|
ShapeRequest shapeRequest(object->_entity);
|
||||||
ShapeRequests::iterator requestItr = _shapeRequests.find(shapeRequest);
|
ShapeRequests::iterator requestItr = _shapeRequests.find(shapeRequest);
|
||||||
if (requestItr == _shapeRequests.end()) {
|
if (requestItr == _shapeRequests.end()) {
|
||||||
ShapeInfo shapeInfo;
|
ShapeInfo shapeInfo;
|
||||||
object->_entity->computeShapeInfo(shapeInfo);
|
object->_entity->computeShapeInfo(shapeInfo);
|
||||||
|
|
Loading…
Reference in a new issue