jPCT-AE - a 3d engine for Android => Support => Topic started by: kiffa on April 26, 2013, 03:11:43 pm

Title: Some issues about Object3d.checkForCollisionSpherical()
Post by: kiffa on April 26, 2013, 03:11:43 pm
My racing game, Codes:
Code: [Select]
    //onDrawFrame, move car.
    mStep = calcStepBySpeed();
    SimpleVector fixedStep = null;
    if (!(fixedStep = mModel.checkForCollisionSpherical(mStep, r)).equals(mStep)) {
      fixedStep.y = mStep.y;
      mStep = fixedStep;

Problem: Sometimes, the car can run through the bar(collider). See the pic below, the white ball is the boundingSphere of the car.

1, The correct collision status:


2, The incorrect status, the car may run through the bar(not often):