mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-16 17:00:13 +02:00
use inverted collision for B-A event
This commit is contained in:
parent
aa8e7d27db
commit
31861d3192
1 changed files with 4 additions and 4 deletions
|
@ -1051,11 +1051,11 @@ void EntityTreeRenderer::entityCollisionWithEntity(const EntityItemID& idA, cons
|
|||
EntityItemPointer entityB = entityTree->findEntityByEntityItemID(idB);
|
||||
if ((bool)entityB && myNodeID == entityB->getSimulatorID()) {
|
||||
playEntityCollisionSound(entityB, collision);
|
||||
emit collisionWithEntity(idB, idA, collision);
|
||||
// since we're swapping A and B we need to send the inverted collision
|
||||
Collision invertedCollision(collision);
|
||||
invertedCollision.invert();
|
||||
emit collisionWithEntity(idB, idA, invertedCollision);
|
||||
if (_entitiesScriptEngine) {
|
||||
// since we're swapping A and B we need to send the inverted collision
|
||||
Collision invertedCollision(collision);
|
||||
invertedCollision.invert();
|
||||
_entitiesScriptEngine->callEntityScriptMethod(idB, "collisionWithEntity", idA, invertedCollision);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue