To dutch_delight: Thanks for your advice.
And in your game, how do you implement the AI? I was bothered by AI these days, i didn't use the waypoints, i just let them run, then check collision, then move by the result of checkForCollisionEllipsoid(). Codes:
SimpleVector step = calcStepBySpeed(deltaTime);
step = npcCar.checkForCollisionEllipsoid(step, mEllipsoid, 3);
step.y = 0; // flat road, no up an downs.
npcCar.translate(step);
I think this is a rather bad AI
, and i need check collision every frame. If you would share your design, there will be many thanks.
To EgonOlsen: What dose the return value of checkForCollisionEllipsoid() accurately mean? Does the return vector has the same length as the origin vector? Could you explain the algorithm? Could i use obb instead of ellipsoid in jPCT-AE? Which is more suitable for my game?
And there are 7 cars in my game(1player + 6 npc), so there are 7 checkForCollisionEllipsoid() calls per frame, i think this is expensive, any suggestions?