##### Ninja Library - Collision Function

# njCollisionCheckCC

Checks collision for two capsules

### FORMAT

`

  Int njCollisionCheckCC( *h1, *h2 )
  NJS_CAPSULE *h1
  NJS_CAPSULE *h2

`

### PARAMETER

  `*h1` | Capsule object #1 to be collision checked
  `*h2` | Capsule object #2 to be collision checked

### RETURN

  1 | Hit |
  0 | Not hit |

### DESCRIPTION

  Checks collision for two capsules.

### EXAMPLE

      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

njCollisionCheckCC

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999