title: Two way Platform Unity 2D Game Development
body: <p>I am trying to make a platform that you can jump through and then when you press "Down" you can jump off the platform.</p>
  
  <p>The problem is that when you press "Down" all the GameObjects on the platform fall down along with the player.</p>
  
  <p>I managed to make a script using some tutorials that uses the "Platform Effector 2D" using this script.</p>
  
  <pre><code>private PlatformEffector2D effector;
      public float waitTime;
      void Start()
      {
          effector = GetComponent&lt;PlatformEffector2D&gt;();
      }
      void Update()
      {
          if(Input.GetKeyUp(KeyCode.S))
          {
              waitTime = 0.5f;
          }
          if(Input.GetKey(KeyCode.S))
          {
              if(waitTime &lt;= 0)
              {
                  effector.rotationalOffset = 180f;
                  waitTime = 0.5f;
              }
              else
              {
                  waitTime -= Time.deltaTime;
              }
          }
  
          if (Input.GetButtonDown("Jump"))
          {
              effector.rotationalOffset = 0;
          }
  
      }
  </code></pre>