Collision with shape painter

i want to make a word search puzzle game
im using shape painter to make the line to search the word
this is the code

box and box2 are the object that i put in the word that needed to search (hidden in the game)
but it didnt work,
this is the screenshot when i run the game

it didnt have to collision with box1 to make the text appears

is there any other method? or any reference to make simple word search puzzle?

thanks you and sorry for my bad english

I didn’t understand, sorry. :confused:
The point of the game is to draw a line in collision with the two boxes?

You mean to say when you draw line and it is in collision with both boxes, boxes gets deleted and reveals the hidden word? I think you should add trigger once condition to draw event.

In the first place, does collision even work with the shape painter? Collision events are available for objects, but in the description it says not all objects have collision masks.

Another approach would be to forget about using collision, and instead use a boolean variable to keep track of what the user clicked on.

  1. On mouse down (trigger once) → use “if cursor is on object” condition with box1-> set a boolean scene variable, something like “PlayerClickedFirstLetter”, to TRUE.
  2. Then, you can add a “on mouse released” event to check “if cursor is on object” with box2, AND if scene variable “PlayerClickedFirstLetter” is true, then player has found the word so update the text box message.

You can still use your existing events to draw the line, but the line is just for visual effect for the player.

Sort of, but not how people think. This is because shape painters are just the small square object you drag to the scene. So that’s the only thing that can be tested against, which isn’t super useful for most people.

Painted shapes do not have collision currently as they aren’t technically objects.

Another solution might be to use the raycasting condition, start the ray from the starting point of the painted shape, and cast to the end point of the painted shape. Maybe.