void OnCollisionEnter(Collision collision) { //if (collision.gameObject == raccoon) fragile = true; if (ObjectManager.curTool != null) { df.StartDusting(true); SpawnFracturedObj(collision.relativeVelocity * mass); } }
public void trigger(Vector3 pushForce) { pushForce.y = -Mathf.Abs(pushForce.x); rb.AddForceAtPosition(pushForce, collidePoint); //Debug.Log("collide at" + collidePoint); if (!toppled) { ScoreManager.instance.AddScore(objName, aType, scorePoint); toppled = true; TaskManager.instance.UpdateProgress(gameObject); df.StartDusting(false); } }