*sphere | 球 |
*capsule | カプセル |
1 | 接触 |
0 | 非接触 |
球 sphere とカプセル capsuleのコリジョンチェックを行います。 NJS_SPHERE *sphere NJS_CAPSULE *capsule sphere.c.x = -80.f; sphere.c.y = 0.f; sphere.c.z = 0.f; sphere.r = 100.f; capsule.c1.x = 80.f; capsule.c1.y = 0.f; capsule.c1.z = 0.f; capsule.c2.x = 180.f; capsule.c2.y = 0.f; capsule.c2.z = 0.f; capsule.r = 100.f; njCollisionCheckSC(&sphere, &capsule); /* 結果 */ 返り値 = 1