question about checkForCollisionEllipsoid's detect distance;

Started by Uncle Ray, May 21, 2015, 12:13:07 PM

Previous topic - Next topic

Uncle Ray

Object3D source;
Object3D target;
SimpleVector ellipsoid=new SimpleVector(10,10,10);
ini()
{
source.setCollisionMode(Object3D.COLLISION_CHECK_SELF|Object3D.COLLISION_CHECK_OTHERS);
target.setCollisionMode(Object3D.COLLISION_CHECK_SELF|Object3D.COLLISION_CHECK_OTHERS);
source.build();
target.build();
}

update()
{   
    simpleVector front=obj.getZAxis();
     simpleVector fix_front=null;
    fix_front=obj.checkForCollisionEllipsoid(front,ellipsoid, 5);
    if(front.equals(fix_front)==true)
    {
       source.setTransparency(-1);//source will see
    }
    else if(front.equals(fix_front)==false)
    {
       source.setTransparency(0);//source will disappear
    }
   source.translat(fix_front);
}







my problem:
when ellipsoid=(10,10,10) or ellipsoid=(100,100,100);
their checkcollition's distance was the same,just same unit away between source and target,then source be disappear.

so how to change checkcollition's distance?whatever i do with ellipsoid,but the distance just the same.