i trying to swing an object by using Linear interpolation.
Asked
Active
Viewed 81 times
1 Answers
0
Use RotateAround function of transform:
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
void Update() {
transform.RotateAround(transform.position, Vector3.up, alpha);
}
}
where alpha is the angle you wish to rotate, and you need update this to make smooth rotations.

David
- 15,894
- 22
- 55
- 66