Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1040

Problems with DzLine3.segmentsIntersect

$
0
0

If I create a DzLine3 with an origin.x as a numeber with decimal places segmentsIntersect and linesIntersect will return false. If I use an integer true will be returned.

var l1 = new DzLine3(new DzVec3(52.9289,12.9289,0), new DzVec3(240,12.9289,0));
var l2 = new DzLine3(new DzVec3(80,0,0), new DzVec3(60,20,0));
print(JSON.stringify(l1.segmentsIntersect(l2))); // returns false
print(JSON.stringify(l1.linesIntersect(l2))); // returns false
var l1 = new DzLine3(new DzVec3(53,12.9289,0), new DzVec3(240,12.9289,0));
var l2 = new DzLine3(new DzVec3(80,0,0), new DzVec3(60,20,0));
print(JSON.stringify(l1.segmentsIntersect(l2))); // returns true
print(JSON.stringify(l1.linesIntersect(l2))); // returns true

Is there any idea what happens?


Viewing all articles
Browse latest Browse all 1040

Latest Images

Trending Articles



Latest Images