Search Unity

Question Questions regarding tap to move and interact with an object functions

Discussion in '2D' started by LunyaFluff, Feb 5, 2022.

Thread Status:
Not open for further replies.
  1. LunyaFluff

    LunyaFluff

    Joined:
    Jan 29, 2022
    Posts:
    1
    Hello, I'm making a 2D game for android where the player needs to interact with specific objects inside a room by tapping them; after tapping, the player moves towards the object and only after the player reaches the object a dialogue window appears. (The player must not have free movement, they should only move when selecting an object)
    I'm struggling knowing how to code this feature because I'm new to Unity and coding in general. I would appreciate if someone could explain how to code this by explaning it as detailed as possible.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,726
    That seems a little bit silly for one of us to try and do in this little teeny tiny text box when there are already more than 22 million Youtube tutorials out there for this exact thing.

    Screen Shot 2022-02-05 at 1.30.20 PM.png
     
  3. Lillebjorn

    Lillebjorn

    Joined:
    Jan 18, 2022
    Posts:
    1
    I am another developer of this project. I just want to say that your pasted image clearly shows that you have not bothered to understand what our problem was because the videos in your image have nothing to do with the question asked (the project is 2D, the movement is not based on tracking finger movement and not every RPG has the same features). Besides, your attitude is very rude, assuming that we are incapable of doing something as little as a google research. If it had been this easy, we wouldn't have bothered asking a question on the Unity forums. I guess we will find our answer somewhere else where actual issues are taken seriously.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,726
    I believe the question asked was this:

    You usually don't find tutorials that do exactly what you want unless it's just one specific thing, not a chain of three things with one of them being a dialog window.

    The way tutorials work is you break down the problem you have and work on it one tutorial at a time.

    How to tap

    How to move

    How to dialog.

    Tutorials and example code are great, but keep this in mind to maximize your success and minimize your frustration:

    How to do tutorials properly, two (2) simple steps to success:

    Tutorials are a GREAT idea. Tutorials should be used this way:

    Step 1. Follow the tutorial and do every single step of the tutorial 100% precisely the way it is shown. Even the slightest deviation (even a single character!) generally ends in disaster. That's how software engineering works. Every step must be taken, every single letter must be spelled, capitalized, punctuated and spaced (or not spaced) properly, literally NOTHING can be omitted or skipped.

    Fortunately this is the easiest part to get right: Be a robot. Don't make any mistakes.
    BE PERFECT IN EVERYTHING YOU DO HERE!!

    If you get any errors, learn how to read the error code and fix your error. Google is your friend here. Do NOT continue until you fix your error. Your error will probably be somewhere near the parenthesis numbers (line and character position) in the file. It is almost CERTAINLY your typo causing the error, so look again and fix it.

    Step 2. Go back and work through every part of the tutorial again, and this time explain it to your doggie. See how I am doing that in my avatar picture? If you have no dog, explain it to your house plant. If you are unable to explain any part of it, STOP. DO NOT PROCEED. Now go learn how that part works. Read the documentation on the functions involved. Go back to the tutorial and try to figure out WHY they did that. This is the part that takes a LOT of time when you are new. It might take days or weeks to work through a single 5-minute tutorial. Stick with it. You will learn.

    Step 2 is the part everybody seems to miss. Without Step 2 you are simply a code-typing monkey and outside of the specific tutorial you did, you will be completely lost. If you want to learn, you MUST do Step 2.

    Of course, all this presupposes no errors in the tutorial. For certain tutorial makers (like Unity, Brackeys, Imphenzia, Sebastian Lague) this is usually the case. For some other less-well-known content creators, this is less true. Read the comments on the video: did anyone have issues like you did? If there's an error, you will NEVER be the first guy to find it.

    Beyond that, Step 3, 4, 5 and 6 become easy because you already understand!

    Finally, when you have specific errors, here is how to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220
     
  5. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    There are a variety of resources available, try google and https://unity.com/learn
    These forum exist as a support for unity users. It is expected that you put some minimal effort into what you are doing. Support, yes. Step-by-step teaching... no.

    However, you do want step-by-step teaching, you can post a request in commercial jobs forum to hire someone for one-on-one training.
    Closed.
     
Thread Status:
Not open for further replies.