I have some problem with the Bowl Master game.
When I enter the game mode and start playing, the ball will roll over the table and when it reaches the pins, a lot of pins shows up (like frozen windows with windows xp)
I don’t think that it’s a code related error because the pins doesn’t have a code (only the rigidbody not 2d) and the ball have only this code
public class Ball : MonoBehaviour
{
public float launchSpeed=10f;
private Rigidbody rigidBody;
private AudioSource audioSource;
// Use this for initialization
void Start ()
{
rigidBody = GetComponent<Rigidbody>();
audioSource = GetComponent<AudioSource>();
Launch();
}
public void Launch()
{
rigidBody.velocity = new Vector3(0, 0, launchSpeed);
audioSource.Play();
}
// Update is called once per frame
void Update ()
{
}
}
and the camera have this one
public class CameraControll : MonoBehaviour
{
public Ball ball;
private Vector3 offSet;
// Use this for initialization
void Start ()
{
offSet = transform.position- ball.transform.position;
}
// Update is called once per frame
void Update ()
{
if (transform.position.z <= 1800f)
{
transform.position = ball.transform.position + offSet;
}
}
}
I’ve tried to change speed to slower one, but it’s not that the problem