You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current reflection algorithm is a pure brute force. The ray is traced until it hits a mirror, and then the angle after reflection is calculated using inverse trigonometric functions.
Using equation of line and some geometry, this algorithm can be obviously optimised and result in a much smoother gameplay.
The functions for the reflection algorithm are located in scripts/levels.js
The text was updated successfully, but these errors were encountered:
The current reflection algorithm is a pure brute force. The ray is traced until it hits a mirror, and then the angle after reflection is calculated using inverse trigonometric functions.
Using equation of line and some geometry, this algorithm can be obviously optimised and result in a much smoother gameplay.
The functions for the reflection algorithm are located in scripts/levels.js
The text was updated successfully, but these errors were encountered: