This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
Component for triggering an action when the player collides #423
oaklandgit
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Wanted to share this in case it's useful for anyone. It took a while for me to work it out.
It's a component I call "triggerByKeyPress" you add to a game object that a player would interact with on keypress.
(the example below relies on two additional components,
hoverText()
andoverlay()
but I'm not including them here.)Usage:
In this example I have a message "envelope" that the player is supposed to click to read:
The triggerByKeyPress component:
Beta Was this translation helpful? Give feedback.
All reactions