Hello,
Ive got a problem with Raycasting2d and 3d since I updated to Unity 5 and so far I couldnt find a solution anywhere online.
I started my project in version 4.6 then I updated to Unity 5 and since then Raycasting or Linecasting doesn`t work anymore in my converted program. Now, when I start a new project I have no problem with embedding Raycasting, the problem only occurs with the converted projects.
Does anyone have an idea or a solution for my problem or a suggestion where to find one?
Thank you!
Can you post the code that isn’t working properly?
This is the file which is only working in a newly in Unity 5 created project. In a converted one the linecasting is only triggering at the “rayStart” position.
I would be really thankful for any kind of advice!
2242358–149675–Lining.cs (437 Bytes)
Finally i figured out what my problem was. It was such a stupid mistake and had nothing to do with the Unity 5 upgrade. I had a collision between a layer which is my frame for my camera and the Raycasting. So I only hat to change “Start in Collisions” Settings in the Physics2D Preferences.