// Update is called once per frame void Update() { if (SameDirection(gravityObject.GetGravityScale(), controller.GetGravityDirection())) { gravityObject.SetGravityScale(gravityObject.GetGravityScale() * -1); } }
// Start is called before the first frame update void Start() { gravityObject = GetComponent <GrabbableItem>(); gravityObject.SetGravityScale(gravityObject.GetGravityScale() * -1); controller = FindObjectOfType <GameController>(); }