Hey guys, I could really use some help here ( I apologize for being a noob in advance . Kinda new to Unity scripting and have a basic understanding of programming). Thanks for help in advance.
I’m trying to right a script ( C# preferably, but java can help) to grab data from excel. This data is pretty much feeds angles of an object that rotates about the x axis. I need the object to rotate smoothly to those degrees. Think of something oscillating to the left, back, then to the right using these angles per time step.
When I do a test code with transform.rotate , it keeps rotating an my object continuously. I even looked into euler angles and that’s slightly over my head. Anyways, I including a schematic and a sample excel table within the zip consisting of an angle of interest, the current angle, and incremental change…
using UnityEngine;
using System.Collections;
public class Rotate Barge : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
transform.rotate(0,0,0);
//transform.rotate(1,0,0);
//transform.rotate(2,0,0);
}
}
[22343-oscilating+rotation.png|22343]