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. Dismiss Notice

Question I Need help with a Point and Click System

Discussion in '2D' started by Ahornius, Apr 29, 2021.

  1. Ahornius

    Ahornius

    Joined:
    Apr 28, 2021
    Posts:
    7
    I am working on a simple Point and Click adventure and I do have a problem with the coding.
    I am a real noob in coding and I dont really know how to use Unity engine either but I Made it to let the character move Boy clicking on the ground and I have a Little Investory system. Now That I have set up this stuff, I warnt let the character move towards a selected object before picking it up or interacting with it.
    I hope someone can help me with That issue.
     
  2. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,826
    It is essentially the same as the case when you're clicking on the ground. The difference is that you need to store what object/interactable the user clicked on, so when you arrive to it you can start the interaction.
     
  3. Ahornius

    Ahornius

    Joined:
    Apr 28, 2021
    Posts:
    7
    Thank you Ford the fast reply Hut could you roughly explain how this would Look like in the code?
     
  4. Ahornius

    Ahornius

    Joined:
    Apr 28, 2021
    Posts:
    7
    I dont understend how i let My Player stay on the floor and not making him walk up the Wall and going towards the Item
     
  5. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,826