Hello, a newbie here.
Learning C#, while expermenting on Unity. so I created Sphere as a game object. and it can ride on a platform. if, he falls down, i want him to get back on the screen and take one life out, as normal in most games. but, because it's a sphere, after he falls, his rotation goes crazy. and i don't really know how to set it up to 0.0.0 after I "revive" my player.
if (transform.position.y < die && lives > 0)
{
transform.position = new Vector3(0, 3, 0);
//transform.Rotate(0, 0, 0); <- doesnt work..
lives--;
}
↧