Reset collision

hi there,



i'm having a problem with collision, i'd like to manually reset it.

something like " oldData.setTargetTris().size() = 0; "   

so getTargetTris().size() is equal 0 (no longer > 0)

any way to do something like that ?

i searched the forum and jmetest they returned 0 (zero) example of use with setTargetTris()

how can i force manually  getTargetTris().size() to return zero ?



i have the following code:


public class IngameState extends CameraGameState {

    private CollisionResults results;
    private CollisionData oldData;

    public IngameState(String name) {
        CollisionTreeManager.getInstance().setTreeType(CollisionTree.Type.AABB);
        results = new TriangleCollisionResults();
    }

    protected void stateUpdate(float tpf) {
        results.clear();           
        playerNode.findCollisions(rootNode, results);

        oldData = results.getCollisionData(0);

        if (oldData.getTargetTris().size() == 0) {       
        /*
        most of the game code goes here..
        */
        }
       
        if (oldData.getTargetTris().size() > 0)
        {
         // here i would like to reset the collision to get out of this if condition, something like:
         // " oldData.setTargetTris().size() = 0; "   so getTargetTris().size() is equal 0 (no longer >0)

         // set back player to the last known valid position
         playerNode.getLocalTranslation().set(lastPosition);
        }
    }
}



(full code can be seen here: here)
tnx

nevermind i finally found a solution for this.

(i just needed to set initial player Y axis to something bigger than 0, or i'd get thoses random collision reports)