public virtual void Start() { rb.constraints = RigidbodyConstraints.FreezeRotation; rb.useGravity = false; attractor = GameObject.Find("Planet").GetComponent <FakeGravity>(); }
private void Start() { _objRigidbody = GetComponent <Rigidbody>(); _objRigidbody.constraints = RigidbodyConstraints.FreezeRotation; _objRigidbody.useGravity = false; _objTransform = transform; if (_attractor == null) { _attractor = GameObject.FindGameObjectWithTag("World").GetComponent <FakeGravity>(); } }