mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
entities that are children shouldn't (at this point) be dynamic.
This commit is contained in:
parent
cbed542682
commit
872a00d518
1 changed files with 5 additions and 0 deletions
|
@ -144,7 +144,12 @@ PhysicsMotionType EntityMotionState::computePhysicsMotionType() const {
|
|||
return MOTION_TYPE_STATIC;
|
||||
}
|
||||
assert(entityTreeIsLocked());
|
||||
|
||||
if (_entity->getDynamic()) {
|
||||
if (!_entity->getParentID().isNull()) {
|
||||
// if something would have been dynamic but is a child of something else, force it to be kinematic, instead.
|
||||
return MOTION_TYPE_KINEMATIC;
|
||||
}
|
||||
return MOTION_TYPE_DYNAMIC;
|
||||
}
|
||||
return (_entity->isMoving() || _entity->hasActions()) ? MOTION_TYPE_KINEMATIC : MOTION_TYPE_STATIC;
|
||||
|
|
Loading…
Reference in a new issue