21 posts
• Page **2** of **3** • 1, **2**, 3

**Posts:**5,511**Reputation:**83,460

B

97
S

36
G

131
@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?

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?

**Posts:**1,118**Reputation:**14,587

B

46
S

21
G

19
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.

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.

**Posts:**5,511**Reputation:**83,460

B

97
S

36
G

131
R0J0hound wrote: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!

**Posts:**1,118**Reputation:**14,587

B

46
S

21
G

19
21 posts
• Page **2** of **3** • 1, **2**, 3

## Who is online |

Users browsing this forum: gaminslab and 23 guests |