title: Bouncing ball on isometric line
body: <p>I am trying to simulate the bouncing ball effect on unity for my isometric game. I got a code to make that and it works fine from this link:
  <a href="https://physics.stackexchange.com/questions/256468/model-formula-for-bouncing-ball#:%7E:text=The%20coefficient%20of%20restitution%20is,ball%20it%20is%20around%200.75">https://physics.stackexchange.com/questions/256468/model-formula-for-bouncing-ball#:~:text=The%20coefficient%20of%20restitution%20is,ball%20it%20is%20around%200.75</a>.</p>
  <p>I want to convert the resulting movement, namely the (h) to iso. I end up with this two-equation</p>
  <pre><code>        // Walk from current postion in ISO line
            transform.position = new Vector2(transform.position.x + oneCellSize, 
                transform.position.y + (oneCellSize * IsoRatio));
  
          // Perfect bouncing effect on ISO line but in wrong position
            transform.position = new Vector2(transform.position.x + 0.02f, 
              (transform.position.x + oneCellSize) * IsoRatio +  BallHightOnTime );
  </code></pre>
  <p>But I failed to merge them together as the second one is using the x position. When I tried to change to y, it just moves in a crazy way.</p>