Mouse Tracking Issue
A simple fix for the Unity 5 raycasting issue
Reminder - Keep Daily Backups!
When working on a strategy game with a kit as big as the Complete Kit - always keep a working daily backup! Save yourself the trouble of rolling-back changes and losing work.
You may notice when testing in the Unity Editor that when playing a building your mouse and the building may be offset by a large amount. (Although not seen in the screenshot below, imagine the mouse is located in the bottom left but the building the same movement is tracking in the top right)
![Screen Shot 2016-11-22 at 1.53.43 AM 2.png 461](https://files.readme.io/e8868ae-Screen_Shot_2016-11-22_at_1.53.43_AM_2.png)
Mouse offset
This is related to the raycasting building issue too - some building effects appear off, like in the below image. This is an issue with Unity 5 raycasting and occurs when testing inside the Unity editor - not in the gameplay.
![strange-sliding-building-layer-bug.png 450](https://files.readme.io/ac4e478-strange-sliding-building-layer-bug.png)
When the game is run in editor something is off (and this accounts for a mouse raycast offset too when testing in the Unity editor).
How to fix
Everything goes back to normal if you resize the window a bit (make sure you don't have maximize on play enabled). Just drag the corner a few pixels and let go. The raycasting issue will fix itself instantly.
![Screen Shot 2016-11-22 at 1.35.23 AM 2.png 997](https://files.readme.io/f990489-Screen_Shot_2016-11-22_at_1.35.23_AM_2.png)
Click to view larger.
Updated less than a minute ago