mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
use abs to compute lod distance
This commit is contained in:
parent
bbae7e05ab
commit
e2118e70a0
@ -272,7 +272,7 @@ compute_child(CullTraverser *trav, CullTraverserData &data) {
|
||||
LPoint3f center = cdata->_center * rel_transform->get_mat();
|
||||
|
||||
// Determine which child to traverse
|
||||
float dist = dot(center, LVector3f::forward());
|
||||
float dist = fabs(dot(center, LVector3f::forward()));
|
||||
|
||||
for (int index = 0; index < (int)cdata->_switch_vector.size(); index++) {
|
||||
if (cdata->_switch_vector[index].in_range(dist)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user