mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:13:05 +02:00
rather than activating rigid body and forcing non-static on deserialize, just force non-static
This commit is contained in:
parent
c3821d7202
commit
d4937071e1
3 changed files with 5 additions and 1 deletions
|
@ -328,5 +328,5 @@ void AvatarActionHold::deserialize(QByteArray serializedArguments) {
|
||||||
_active = true;
|
_active = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
activateBody();
|
forceBodyNonStatic();
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,6 +244,9 @@ void ObjectAction::activateBody() {
|
||||||
if (rigidBody) {
|
if (rigidBody) {
|
||||||
rigidBody->activate();
|
rigidBody->activate();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ObjectAction::forceBodyNonStatic() {
|
||||||
auto ownerEntity = _ownerEntity.lock();
|
auto ownerEntity = _ownerEntity.lock();
|
||||||
if (!ownerEntity) {
|
if (!ownerEntity) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -63,6 +63,7 @@ protected:
|
||||||
virtual glm::vec3 getAngularVelocity();
|
virtual glm::vec3 getAngularVelocity();
|
||||||
virtual void setAngularVelocity(glm::vec3 angularVelocity);
|
virtual void setAngularVelocity(glm::vec3 angularVelocity);
|
||||||
virtual void activateBody();
|
virtual void activateBody();
|
||||||
|
virtual void forceBodyNonStatic();
|
||||||
|
|
||||||
EntityItemWeakPointer _ownerEntity;
|
EntityItemWeakPointer _ownerEntity;
|
||||||
QString _tag;
|
QString _tag;
|
||||||
|
|
Loading…
Reference in a new issue