20 posts
• Page **2** of **2** • 1, **2**

**Posts:**5,232**Reputation:**67,250

B

91
S

31
G

102
@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:**944**Reputation:**12,210

B

35
S

15
G

17
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,232**Reputation:**67,250

B

91
S

31
G

102
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:**944**Reputation:**12,210

B

35
S

15
G

17
20 posts
• Page **2** of **2** • 1, **2**

## Who is online |

Users browsing this forum: marc254 and 7 guests |