detecting connected actors?
hi guys, wondered if i could please get some help with detecting what actors are connected to each other, think a match 3 game but not using a grid, its physics based.
anyways so far i have a rule set up as follows:
actor_type_1=
if actor collides with actor of type "actor_type_1" change "self connected to "true"
now this does detect that the actor is colliding with an actor of the same type, so what i want to do now is have both actors destroy when i basically tap only one of the connected actors. I know how to use the destroy command but how do i set it up to destroy actors I'm not even touching but are colliding with the actor i would touch.
thats my first step.
After this i hope to work out how to destroy all the actors connected i.e. 4 actors colliding with each other but not other actors of the same type that are also colliding with each other as they have not been tapped or currently touched.
and eventually have this so that everything is detected using magnitude so that things don't need to touch so precisely.
but yes i first need to work out how to have just 2 connected actors destroy when only one is touched, baby steps i guess haha
hope someone can please help, I've looked for tutorials but they all just point to templates
Comments
It's ok I've figured everything out