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

Moving 3D object through buttons

Discussion in 'Scripting' started by TheOneRaven, Nov 18, 2019.

  1. TheOneRaven

    TheOneRaven

    Joined:
    Oct 28, 2016
    Posts:
    15
    Hello there,

    currently I am creating an application in which a user has three options A, B and C.
    The user begins at the "start" point and needs to go to point A, B and then C.
    The user has 3 buttons in front of him (first person car perspective) and when he presses A for instance, the player (camera) and the car 3D object need to move to point A by itself, it needs to accelerate and stop out of itself.

    I can't find any scripts for this online and have barely any knowledge of C#. Is there anyone who knows how this will work?

    thank you!
     
  2. Yoreki

    Yoreki

    Joined:
    Apr 10, 2019
    Posts:
    2,590
    Sounds like a job for NavMesh. I'm not super familiar, but you can input things like the acceleration and speed and so on, and it will find the path on its own. May not be the most realistic car simulation ever, but with some fiddling around it should get the job done.
     
  3. Terraya

    Terraya

    Joined:
    Mar 8, 2018
    Posts:
    646
    yes, NavMesh indeed,
    super easy to use and for what you want todo , it fits perfect
     
  4. TheOneRaven

    TheOneRaven

    Joined:
    Oct 28, 2016
    Posts:
    15
    Thank you I appreciate your help! I will look into it :) have a nice day!
     
  5. TheOneRaven

    TheOneRaven

    Joined:
    Oct 28, 2016
    Posts:
    15
    Hi! Awesome I will look into it right away, thanks :) have a nice day!