Swing on z axis
Hello,
New to Unity and C# (about 2.5 weeks)...making a lot of the tutorial games and as many changes as possible to get an understanding on how the unity engine works and C# programming works...I have about 13 years of HTML/PHP/MySql, but this is an entire different beast...lol
Anyways, I am trying to find a simple way to write an easy scrip to make an object swing...basically move on the z axis -20 or so and than back about 20 over like 3 seconds...to paint a picture I am currently playing with the break out game...and with my children we are making it a family project and my son and I created lantern's in ac3d and we have them hanging off the top of the break out tower on each side and we want to make them swing as to appear like a gentle wind/breeze making them move forward and backward.
I have looked at a few scrips and tried myself and so far no luck...
Thanks in advance, I'm sure is a very simple 2 line code like a rotation code, but I'm just not finding it or able to figure it out without asking for help from the Seasoned Unity Community :)