title: How to make a game object move to the opposite direction of a constantly moving object? Unity 2D
body: <p>I have a game object that constantly rotates around another one:
  <a href="https://i.stack.imgur.com/QmLST.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QmLST.gif" alt="enter image description here" /></a></p>
  <p>What I am trying to achieve is to have the circle move in the opposite direction of the square when I press the space key, the square will simulate a propeller, for example:</p>
  <p><a href="https://i.stack.imgur.com/4Dpc6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4Dpc6.png" alt="enter image description here" /></a></p>
  <p>This is the code I have, which kinda works:</p>
  <pre><code> using System.Collections;
   using System.Collections.Generic;
   using UnityEngine;
   
   public class PlayerController : MonoBehaviour
   {
   
       [SerializeField] GameObject rotatingPropellant;
       [SerializeField] float rotationSpeed;
       [SerializeField] float impulseForce;
   
   
       Rigidbody2D playerRb;
   
       void Start()
       {
           playerRb = GetComponent&lt;Rigidbody2D&gt;();
       }
   
       void Update()
       {
           RotatePropellant();
           Move();
       }
   
       void RotatePropellant()
       {
           rotatingPropellant.transform.RotateAround(transform.position, new Vector3(0f, 0f, 1f), rotationSpeed * Time.deltaTime);
       }
   
       void Move()
       {
           if (Input.GetButtonDown(&quot;Jump&quot;))
           {
               playerRb.velocity = -rotatingPropellant.transform.position * impulseForce * Time.deltaTime;
           }
   
       }
   }
  </code></pre>
  <p>But sometimes the circle moves up even if the square is up (meaning that the circle should be pushed down), not sure if maybe the signs are not correct or if I should be approaching this with a different method</p>