How to launch another program when using or interacting with an object?

Basically, i want to do this:


ObjectX = For the example let’s say a cube

Y-external program = A steam game

When objectX is used/interacted with, launch Y-external program.


That is as simple as i can describe it. I Hope someone out there can help us with a direct solution or some waypointers for what we are looking for/should be looking into! :slight_smile:

Which bit are you having trouble with? Is the player meant to click on ObjectX to interact with it? If so, you need to look into OnMouseDown() or using a Raycast.
Or if you want the character to interact with ObjectX by touching it then you should add a collider set to be a trigger and add a script that listens for tbe OnTriggerEnter() callback. Or something else? (“Use/Interact” is a pretty vague word and you’ve not told us any more about the style of game).