Showing the changes to libraries/entities/src/EntityCollisionSystem.cpp (1 of 59 files). Show all
Unified · Split
| @@ -265,7 +265,7 @@ void EntityCollisionSystem::updateCollisionWithAvatars(EntityItem* entity) { · 264 unmodified lines | |||
| 265 | collision->_addedVelocity /= (float)(TREE_SCALE); | 265 | collision->_addedVelocity /= (float)(TREE_SCALE); |
| 266 | glm::vec3 relativeVelocity = collision->_addedVelocity - entity->getVelocity(); | 266 | glm::vec3 relativeVelocity = collision->_addedVelocity - entity->getVelocity(); |
| 267 | 267 | ||
| 268 | if (glm::dot(relativeVelocity, collision->_penetration) <= 0.f) { | 268 | if (glm::dot(relativeVelocity, collision->_penetration) <= 0.0f) { |
| 269 | // only collide when Entity and collision point are moving toward each other | 269 | // only collide when Entity and collision point are moving toward each other |
| 270 | // (doing this prevents some "collision snagging" when Entity penetrates the object) | 270 | // (doing this prevents some "collision snagging" when Entity penetrates the object) |
| 271 | collision->_penetration /= (float)(TREE_SCALE); | 271 | collision->_penetration /= (float)(TREE_SCALE); |