Esempio n. 1
0
void
SimCarCollideInit(tTrack *track)
{
	dtSetDefaultResponse(SimCarCollideResponse, DT_SMART_RESPONSE, NULL);
	// Hmm, why is caching disabled, are our objects too fast, so it does not work?
	// TODO: understand this and reconsider caching.
	dtDisableCaching();
	dtSetTolerance(0.001);
	
	fixedid = 0;

	if (track != NULL) {
		tTrackSeg *firstleft = getFirstWallStart(track->seg, TR_SIDE_LFT);
		tTrackSeg *firstright = getFirstWallStart(track->seg, TR_SIDE_RGT);

		buildWalls(firstleft, TR_SIDE_LFT);
		buildWalls(firstright, TR_SIDE_RGT);

		unsigned int i;
		for (i = 0; i < fixedid; i++) {
			dtCreateObject(&fixedobjects[i], fixedobjects[i]);
			dtSetObjectResponse(&fixedobjects[i], SimCarWallCollideResponse, DT_SMART_RESPONSE, &fixedobjects[i]);
		}
	}	
}
Esempio n. 2
0
void
SimCarCollideInit(void)
{
    dtSetDefaultResponse(SimCarCollideResponse, DT_SMART_RESPONSE, NULL);
    dtDisableCaching();
    dtSetTolerance(0.001);
}