I want my enemy to move when the game starts ,and changing direction after few seconds so it wont fall.I use this code put it doesn't work ,it change direction only once:
void Update()
{
if (Time.time % 3 == 0)
{
transform.localRotation = Quaternion.Euler(0, 180, 0);
}
}
↧