How do we use hit test?

“this.hitTest(that)”

2 Likes

Welcome to the Wick Forums! :smile:

Please look at this thread, it will
show you how to make a hit test event.

There’s even an example file. :slight_smile:

Also, before creating a new topic, please make sure your question
has not been answered elsewhere.
You can use the search and find many answers to questions you might have!

If you need any additional help, hit me up I’d be glad to
assist!

1 Like

this.hitTest(that) returns true if the object (the one you are programming) hits a specified object in place of “that.” for example, we have an object we are coding named “key” and another object named “lock.” you would say:
if (this.hitTest(lock) {
// open lock
}

Hope this helps you out.

I tried but gave this error: https://prnt.sc/u4pean

did you name the thing?

1 Like

I managed to solve the problem, that was it …

1 Like

:D cool! at least you fixed it