1

Topic: getNumCollisions Function

Hi,
I'm studying the lua script of the "Jules" level.
I don't understand the getNumCollisions function.
It returns a number, stored in the "coll" variable, according to collision between the "feet" mesh and the floor.
And this number seems to be sometimes <2 or >1.
what are the meanings of these different values?

Ed

Re: getNumCollisions Function

Hi,

getNumCollisions return how much objects are colliding,
in the Jules example, it returns the number or objects colliding the "Feet" box,
it returns 1 minimum because "Feet" is always touching "Player" (it's a ghost so it's just use as a collision test).

So if the returned number is more than 1, you know that the character is touching some ground.