CobeyH / Leora

2D Moth Puzzle Game written in Unity
4 stars 1 forks source link

Tweaking Light Attraction #198

Closed CobeyH closed 2 years ago

CobeyH commented 2 years ago

This PR changes the way that moths are attracted to light. This new system is a combination of the original system based on Free Body force diagrams and the new Center of Mass model. Moths now only care about the highest intensity light they can see.

If there is only one light of that highest intensity then the moths will be attracted directly on top of that light. However, if more than one light is tied for maximum intensity then the moths will go to the center point between all the visible lights of the highest intensity. Resolves #188