Press E to use

Every game has an “press E to interact/use”.
But i cant for the life of me figure out how to do it.
If anyone can help I would appreciate it.
(Here is my test world) - PlayCanvas | HTML5 Game Engine -

Hi @Metratanium and welcome!

Below some links to pages with information that can be useful to achieve this.

https://developer.playcanvas.com/en/tutorials/keyboard-input/

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

https://developer.playcanvas.com/en/api/pc.Vec3.html#distance

https://developer.playcanvas.com/en/user-manual/packs/components/element/

This is very helpful, thank you!
I now have another question: how do I create an AND gate?

Please ask every unrelated question in a new topic. I also don’t know what is an ‘and gate’, so maybe you can describe that a little better.