void Awake() { m_Tr = GetComponent <Transform>(); if (GetComponent <MyPhysicsV2>() == null) { this.gameObject.AddComponent <MyPhysicsV2>(); } m_rb = GetComponent <MyPhysicsV2>(); radius = m_Tr.localScale.x * 0.5f; volume = Mathf.PI * 4 / 3 * radius * radius * radius; //constNum = 1; originPos = this.gameObject.transform.position; originRot = this.gameObject.transform.rotation; }
// Start is called before the first frame update void Start() { m_pysics = GetComponent <MyPhysicsV2>(); }