THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/06/2005 at 16:08, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform:
Language(s) : C++ ;
---------
Hi,
Im having a small problem trying to get the GeRayCollider to actually return an intersection
This is what I have right now
poly = static_cast<PolygonObject*>(op);
GeRayCollider *rc = NULL;
GeRayColResult res;
rc = GeRayCollider::Alloc();
rc->Init(poly, TRUE);
if(rc->Intersect(Vector(0,100,0), Vector(0,-1,0), 1000000))
{
// This doesnt intersect!
rc->GetNearestIntersection(&res;);
LONG k = res.distance;
}
GeRayCollider::Free(rc);
where op is a BaseObject. The object I am testing it on is a simple plane at its default position and orientation.
I am simply trying to check for an intersection from point [0,100,0], and its direction directly down.
The above code *should* be finding an intersection, but it doesn't. And not sure why
Any ideas?
Thanks