*h1 | Capsule object #1 to be collision checked |
*h2 | Capsule object #2 to be collision checked |
1 | Hit | |
0 | Not hit |
The following checks collision for two capsules h1 and h2. NJS_CAPSULE h1,h2; h1.c1.x = -80.f; h1.c1.y = 0.f; h1.c1.z = 0.f; h1.c2.x = -180.f; h1.c2.y = 0.f; h1.c2.z = 0.f; h1.r = 100.f; h2.c1.x = 80.f; h2.c1.y = 0.f; h2.c1.z = 0.f; h2.c2.x = 180.f; h2.c2.y = 0.f; h2.c2.z = 0.f; h2.r = 100.f; njCollisionCheckCC(&h1, &h2); % Result % Return : 1