You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, this bug is still valid...also in 1.69 (just took us 1h to figure that out :/).
The issue seems to be the following: If you add Cartesian3 with the same values, the difference will be the zero vector and normalization/division with a zero vector will make the program crash.
We did the following workaround: Only add points to the wall (tmpPos), that have a difference bigger than an epsilon3:
var tmpC3 = new Cartesian3(W_t_W_C.x, W_t_W_C.y, W_t_W_C.z);
var myDiff = new Cartesian3(0,0,0);
if (tmpPos.length > 0 ) {
Cartesian3.subtract(tmpC3, tmpPos[tmpPos.length-1], myDiff);
if (!Cartesian3.equalsEpsilon(myDiff, Cartesian3.ZERO, CesiumMath.EPSILON3)) {
tmpPos.push(tmpC3)
} else {
console.log("diff is ZEROOOO");
}
} else {
tmpPos.push(tmpC3)
}
But yes, it would be nicer, if that bug would be fixed within Cesium :) Thx!
Reported by @primozs
WallGeometry
is not iterating through these positions correctly, resulting in trying to normalize the zero vector:The text was updated successfully, but these errors were encountered: