Jump to content

onColShapeHit with multiple ColShapes in table?


Geo

Recommended Posts

Hypothetical scenario. 

Say that I've a table, maybe something like:

gang_zone = {}

gang_zone[1] = {}

gang_zone[2] = {}

gang_zone[3] = {}

gang_zone[1]  = createColCuboid(123, 456, 789, 1012)

gang_zone[2] = createColCuboid(934, 534, 135, 1941)

gang_zone[3] = createColCuboid(913, 851, 153, 3913)


Is there a way a single onColShapeHit listens for a element hit on all these areas at the same time?
 

 

Link to comment
  • Moderators
14 hours ago, Geo said:

Is there a way a single onColShapeHit listens for a element hit on all these areas at the same time?

See this tutorial.

 

Or attach the addEventHandler on to the resourceRoot. This will trigger the eventHandler only for elements created by the same resource.

  • Thanks 1
Link to comment
On 25/04/2020 at 09:14, IIYAMA said:

See this tutorial.

 

Or attach the addEventHandler on to the resourceRoot. This will trigger the eventHandler only for elements created by the same resource.


Thank you so much man!

  • Like 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...