So I have a box collider and I want it so when im standing over it, it shows text. Like telling you what button to press to enter. How do I do that?

  • 1
    \$\begingroup\$ Collision trigger events and showing/hiding objects is covered in a wide array of Unity tutorials, so you don't really need 1-on-1 personalized Q&A to sort this out. It sounds like you might want to ramp up on the basic engine features a bit further. \$\endgroup\$ – DMGregory Oct 2 '17 at 0:03
  • \$\begingroup\$ got any links? nothing \$\endgroup\$ – gudperson2 Oct 2 '17 at 1:18

You Can use OnTriggerEnter2D. For Example

public class TrigerArea : MonoBehaviour {
    public Text bubbleMessageText;
    void OnTriggerEnter2D(Collider2D other) {
        bubbleMessageText.text = "ENTER YOU MESSAGE HERE";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.