Touch = activate script

Hello! hope everyone’s doing well today!

In this script i need help with come player an script connection. What I want to happen is when the player touches another entity it activates a script. I am trying to do this without using a trigger to make it easier and faster to make my game.

Hi @Mason_Rocchio,

Triggers are quite fast, check this tutorial on how to use them:

https://developer.playcanvas.com/en/tutorials/collision-and-triggers/

Alternatively you can use bounding boxes, they need more setup, but you can get the same result. This example uses bounding boxes for entity picking, you can easily rework it so they act as triggers:

https://developer.playcanvas.com/en/tutorials/entity-picking-without-physics/

1 Like