Im having a circular game board containing 40 tiles . i have to rotate camera onto every third tile . well performed functionality . but when it moves it gives a jerk cos of waitforseconds used to delay movement. well i used Slerp and used Time. delta Time but it didn’t give any suitable result . can anyone suggest how to perform it ?
First, when you post a script, you should post it in the “Answers”, and not in the “Comments” section, since it’s a bit hard to read.
I think you should multiply the Time.deltaTime with a variable, and in case you want the rotation even slower, you should set the variable as a decimal number.
0.1/0.5…, 0.01/0.25…, 0.001… and so on until you’ll get the suitable rotation.
for(Tile =1;Tile<=60;Tile++)
{
lGoTargetTile = GameObject.Find( “tile”+Tile+“target”);
Floatdistance = Vector3.Distance(lGoTargetTile.transform.position,lobjMainCamera.transform.position);
if(Floatdistance>.3 && Tile%3==0)
{
lobjMainCamera.transform.rotation = Quaternion.Slerp(lobjMainCamera.transform.rotation,lGoTargetTile.transform.rotation,Time.deltaTime);
}
}