Hi,
Is there a way to retrieve the number of objects that are currently in collision with another?
For example, I have an object, and I want to know at a given time how many other objects are colliding only with him…
Is that possible?
Hi,
Is there a way to retrieve the number of objects that are currently in collision with another?
For example, I have an object, and I want to know at a given time how many other objects are colliding only with him…
Is that possible?
Yes you can do that no problem.
Set a counter to zero initially
counter = 0
On the began phase of the collision set your counter to:
counter = counter+1
On the ended phase of the collision set your counter to:
counter = counter -1
This will keep count of how many items are colliding with him.
Yes you can do that no problem.
Set a counter to zero initially
counter = 0
On the began phase of the collision set your counter to:
counter = counter+1
On the ended phase of the collision set your counter to:
counter = counter -1
This will keep count of how many items are colliding with him.