0

Detecting click on specific part of object

Hello, I have a multi-part object, a table with parts being frame and shelf. That means parts can be moved away from each other but appear as a single object in Scene object list.

I want to use a script to detect a click on the shelf part to play a sound. I tried using Simple scripts audio and interaction but with them the sound plays when I click anywhere on the table, even if the scripts seem to be incorporated into the frame part of the object. That's the only locations scripts can be put when adding to this object. No way to move them to the shelf part. And no way to tell the Interaction script in which part of the object a click event is valid.

Can someone think about a solution for this, like a variation of the interaction script which supports which part of the object clicks are registered.

0 comments

Please sign in to leave a comment.