Animmaniac's Recent Forum Activity

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • You do not have permission to view this post

  • I would approach it like this:

    Family Trick Demo 02

    Also depending on how your objects are setup it's better to compare the heights using a defined threshold, since sometimes they can be slightly different due to rounding errors.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Maybe you are right, but I'm not currently aware if C2 does this optimization of not checking already checked pairs in reverse order.

    I used to believe it just did two nested loops checking every instance from Family1 Vs every instance of Family2, since the most usual cases of use doesn't involve checking the same instances.

    In this case 'Family On Collision with Family' would check X-X, X-Y, X-Z, Y-X, Y-Y, Y-Z, Z-X, Z-Y, Z-Z.

    I'm in doubt now about what really happens under the hood.

  • cacotigon

    1. For most cases yes, but for this one specifically it has different picking behaviors. Take a look at this example:

    Family Trick Example 01

    2. Yes, if you need to check a whole family with different objects in it. I was just addressing ChrisAlgoo's doubts of how to check collision on two instances of the same type.

    3. I think performance would be almost the same on both approaches. If you check separately every object type of a family against an entire family, or check an entire family against itself you would be performing the same amount of collision checks, just spreading the same computing job over more events.

    I would say that if all objects behave the same when colliding with themselves the "family vs family" approach is more convenient. However if they behave differently, by doing "object vs family" you can spare a lot of collision checks if not all object types will be affected by the actions.

  • I normally use the family trick:

    <img src="https://dl.dropboxusercontent.com/u/7871870/construct/family-trick-01.png" border="0" />

    You just add the object to a family and check for collision between the object and the family. Then referencing the object will pick the first instance and referencing the family the other.

    The only inelegant part is the cases where you need to create a family for this sole purpose, but I guess it's not a big deal.

  • You do not have permission to view this post

Animmaniac's avatar

Animmaniac

Member since 18 Mar, 2010

Twitter
Animmaniac has 1 followers

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies