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

Using DzBox3::getIntersection

$
0
0

Not sure if it is the method or my understanding that is incorrect here...

The result appears to always be [0, 0, 0] for the first intersection point with both DS4 and DS6, and the DS4 SDK.

 

In the following example, I expect [[0, 0, -50], [0, 0, 50]]. Am I wrong in expecting this?

var oSettings = DzSettings();
Geometry.getDefaultPrimitiveOptions(Geometry.Cube, oSettings);
var oNode = Geometry.createPrimitive(oSettings);

var oLine = DzLine3([[0, 0, -4000], [0, 0, 4000]]);

var oIntersection = oNode.getWSBoundingBox().getIntersection(oLine);
print (oIntersection.intersects);
print (oIntersection.firstIntersection);
print (oIntersection.lastIntersection);
Executing Script...
true
[0,0,0]
[0,0,50]
Result: 
Script executed in 0 secs 7 msecs.

Viewing all articles
Browse latest Browse all 1067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>