Im trying to set up a rotating particle. For some reason it doesnt rotate around the center like its supposed to in the script.
here is the script
var interval = 5;
var direction = 1;
function Start () {
var clip = new AnimationClip ();
var curve = AnimationCurve.Linear(0, 0, interval, direction*360); //from 0 to 6 seconds, 0 to 360 degrees
curve.postWrapMode = WrapMode.Loop;
clip.SetCurve ("", typeof(Material), "_MainTex.rotation", curve);
animation.AddClip (clip, clip.name);
animation.Play(clip.name);
}
@script RequireComponent(Animation)
For some reason it looks really bad and even has some strange clipping of some sort in the corner. Any help would be greatly appreciated Ive been trying to figure this out for a while lol. The package is attached BTW if you want to look at the project
i couldnt attach the project so i uploaded it externally.
http://spiralconcepts.com/unity/rotatematerial.unitypackage
-B