How can I check what is colliding with an item

I’m trying to check what a block is colliding with in CoBlocks.
i tried using the when collide function but it can only detect when another object starts to collide or exit
Now I’m storing all items that start to collide with my object in a list which isnt efficient.
On top of that, i am having multiple items doing it at the same time.
Is there any better way?

Hi @lht2007, it depends, what are you using it for? Generally telling the computer what to look for is best; I’ve done it here by using a named block as a child and having the computer check for that name.

As for the start/stopping you could use the list format you are using now; Or whenever you need to have this data do a check for the items applicable, though the way cospaces handles these events could cause issue’s given it takes a bit of time for an item to reconize its collision after assignment.
I’d be happy to hear the case you’re using it for and give some more specific advice!

thank you for your reply! i am trying to make a car parking puzzle system and stuck in stop cars from moving when it is connected with other cars or the wall. Ill try the method of creating child for now, seems like it will work

Ah that’s cool! I remember having one of those games, smart choice I think it will make for a great game in coSpaces. Would love to see it when it’s done, best of luck!