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

Making a tank barrel aim up and down

Discussion in 'Scripting' started by Airide101, Dec 12, 2015.

  1. Airide101

    Airide101

    Joined:
    Feb 20, 2015
    Posts:
    7
    Say I have a tank, and then I have the tank barrel. If I want to rotate the barrel up and down so it can aim, how can I do this with the pivot point local at the end of the barrel rather than the pivot point being in the center??
     
  2. Afrodeity

    Afrodeity

    Joined:
    Dec 19, 2015
    Posts:
    12
    Create an object and parent the barrel to it. The parent can now be used as your new pivot point.