[SOLVED] How do I calculate bounce angle in isometric view.

0 favourites
From the Asset Store
Bounce the ball and try to keep it bouncing and prevent it from falling down for as long as you can.
  • R0J0hound quick question.

    set ang_surface to angle(0,0,cos(ang_surface), sin(ang_surface)*2)

    if this converts to the non isometric angle. ie 26,5 to 45.

    How do i convert something back, from normal angles, 45 to 26,5? i have to reverse this somehow?

  • Just halve to y component to do it:

    angle(0,0,cos(ang_surface), sin(ang_surface)/2)

  • Thanks R0j0hound.

    I'm still getting some weird behaviour with this solution. It seems like i get like this (and like the image above) no matter what I do. All the wide angles seem off and I'm not getting an exit angle at the same angle if they are perpendicular to the surface angle.

    Any idea of what i need to adjust? The problem seems to be with the exit angle.

    2*ang_surface-ang_in seems to be the problem. Needs adjusting back to isometric?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here's my current test for the adjusting of the normal for bouncing:

    https://dl.dropboxusercontent.com/u/542 ... oTest.capx

    You can drag everything around, and the red line is the visual normal and the blue line is the the corrected normal.

    The issue as you describe is when the angle the balls travel are perpendicular to the blue normal. Which would mean it's there is no perpendicular motion to reflect so it doesn't bounce.

    Mid typing this I re-uploaded the file with an idea that seems to work. It takes both the surface angle and the angle of the ball and doubles the y component before calculating the bounce. Then it halves the y component of the resulting angle.

    So if you end up using the normal from the ray caster plugin just add or subtract 90 (it doesn't affect the math) from that the get the surface angle.

  • Here's my current test for the adjusting of the normal for bouncing:

    Mid typing this I re-uploaded the file with an idea that seems to work. It takes both the surface angle and the angle of the ball and doubles the y component before calculating the bounce. Then it halves the y component of the resulting angle.

    Seemed like that was the issue. Took a look at your example file and now the angles makes sense. Thanks for a lot for your help!

  • tunepunk do you still have the example file because the link is dead and i have exactly the same problem of you, i want handle rebounds in a isometric view . TY !

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)