Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question how to script a click to make an object teliport

Discussion in 'Scripting' started by stormtrooperatt, Dec 5, 2020.

  1. stormtrooperatt

    stormtrooperatt

    Joined:
    Jul 23, 2020
    Posts:
    5
    Ok, so I've looked around and I don't quite know how to program a click in unity.
    what I'm trying to do is make a program so that when i click on a dark spot, the player teliports to that dark spot. How do I do that?
     
  2. Havyx

    Havyx

    Joined:
    Oct 20, 2020
    Posts:
    140
  3. stormtrooperatt

    stormtrooperatt

    Joined:
    Jul 23, 2020
    Posts:
    5
    thanks, the darkness i'm using is a sprite, so i'm probably just check it's tag. either way thanks for the help.