Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Use paintMask layer in Double raycasting #10
Code casts ray from up towards the mesh being painted one.
Example use-case is painting on the bottom of the lake and rays colliding
Code casts ray from up towards the mesh being painted one. Hovewer this raycast not using paintMask could collide with some intermediate colliders. Example use-case is painting on the bottom of the lake and rays colliding with water plane.
FYI @AlexanderAmeye some additional comments/insights after working with the code:
The 'proper' solution would probably be to use RaycastAll and look for wanted object in the list. If I hit the problem again I will probably fix it but for now I'm just leaving a comment to spread the knowledge.