mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:49:24 +02:00
Merge pull request #5130 from ZappoMan/fixRayPicking
fix detailed ray picking against models
This commit is contained in:
commit
ab73905832
1 changed files with 2 additions and 2 deletions
|
@ -1761,7 +1761,7 @@ void Model::setupBatchTransform(gpu::Batch& batch, RenderArgs* args) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AABox Model::getPartBounds(int meshIndex, int partIndex) {
|
AABox Model::getPartBounds(int meshIndex, int partIndex) {
|
||||||
if (!_calculatedMeshPartBoxesValid) {
|
if (!_calculatedMeshPartBoxesValid || !_calculatedMeshBoxesValid) {
|
||||||
recalculateMeshBoxes(true);
|
recalculateMeshBoxes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1802,7 +1802,7 @@ void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool tran
|
||||||
|
|
||||||
// we always need these properly calculated before we can render, this will likely already have been done
|
// we always need these properly calculated before we can render, this will likely already have been done
|
||||||
// since the engine will call our getPartBounds() before rendering us.
|
// since the engine will call our getPartBounds() before rendering us.
|
||||||
if (!_calculatedMeshPartBoxesValid) {
|
if (!_calculatedMeshPartBoxesValid || !_calculatedMeshBoxesValid) {
|
||||||
recalculateMeshBoxes(true);
|
recalculateMeshBoxes(true);
|
||||||
}
|
}
|
||||||
auto textureCache = DependencyManager::get<TextureCache>();
|
auto textureCache = DependencyManager::get<TextureCache>();
|
||||||
|
|
Loading…
Reference in a new issue