mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 13:56:24 +02:00
also honor ignore collisions for voxels and avatars
This commit is contained in:
parent
bbd476d564
commit
7bea4b3123
1 changed files with 9 additions and 0 deletions
|
@ -78,6 +78,11 @@ void EntityCollisionSystem::emitGlobalEntityCollisionWithEntity(EntityItem* enti
|
|||
}
|
||||
|
||||
void EntityCollisionSystem::updateCollisionWithVoxels(EntityItem* entity) {
|
||||
|
||||
if (entity->getIgnoreForCollisions() || !entity->getCollisionsWillMove()) {
|
||||
return; // bail early if this entity is to be ignored or wont move
|
||||
}
|
||||
|
||||
glm::vec3 center = entity->getPosition() * (float)(TREE_SCALE);
|
||||
float radius = entity->getRadius() * (float)(TREE_SCALE);
|
||||
const float ELASTICITY = 0.4f;
|
||||
|
@ -220,6 +225,10 @@ void EntityCollisionSystem::updateCollisionWithAvatars(EntityItem* entity) {
|
|||
return;
|
||||
}
|
||||
|
||||
if (entity->getIgnoreForCollisions() || !entity->getCollisionsWillMove()) {
|
||||
return; // bail early if this entity is to be ignored or wont move
|
||||
}
|
||||
|
||||
glm::vec3 center = entity->getPosition() * (float)(TREE_SCALE);
|
||||
float radius = entity->getRadius() * (float)(TREE_SCALE);
|
||||
const float ELASTICITY = 0.9f;
|
||||
|
|
Loading…
Reference in a new issue