Hey, guys. I’m testing a specific Scene here and I realised the ball is drastically loosing energy only after hitting two bricks at once. But it’s strange because it seems a little random. Sometimes it happens with different bricks and I could recreate this same condition only in one of my scenes.
I checked the bank material and bounciness is 1, friction 0.
Ball script also looks fine:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Seed : MonoBehaviour {
private Joint joint;
private bool hasStarted = false;
private Vector3 jointToSeedVector;
// Use this for initialization
void Start () {
joint = GameObject.FindObjectOfType<Joint>();
jointToSeedVector = this.transform.position - joint.transform.position;
}
// Update is called once per frame
void Update ()
{
if (!hasStarted) {
this.transform.position = joint.transform.position + jointToSeedVector;
if (Input.GetMouseButtonDown (0)) {
print ("Mouse Button pressed");
hasStarted = true;
this.GetComponent<Rigidbody2D>().velocity = new Vector2 (2f, 10f);
}
}
}
}
I have no idea what may be causing this. Any thoughts?