Hours
Code: Select all
forwardtime = 10;
starttime = time+(forwardtime*3600);
h =starttime/3600;
s = Math.floor(h);
s2 = h-s;
if (s2 > 0.99){
transform.rotation = (Math.floor(h)*30)+((s2-0.99)*(1/0.01)*30);
}else{
transform.rotation = Math.floor(h)*30;
}
Code: Select all
forwardtime = 11;
starttime = time+(forwardtime*60);
m = starttime/60;
s = Math.floor(m);
s2 = m-s;
if (s2 > 0.9){
transform.rotation = (Math.floor(m)*6)+((s2-0.9)*(1/0.1)*6);
}else{
transform.rotation = Math.floor(m)*6;
}
Code: Select all
timer = time+23;
s = Math.floor(timer);
s2 = timer-s;
if (s2 > 0.7){
transform.rotation = (Math.floor(timer)*6)+((s2-0.7)*(1/0.3)*6);
}else{
transform.rotation = Math.floor(timer)*6;
}