- Home /
Question by
Koenn · Jan 01, 2017 at 04:57 PM ·
meshraycastingvertices
Raycast not working on terrain
So I have this terrain mesh:
And I'm trying to get a raycast from the player to the terrain, so I can see where on the terrain he's looking. I tested it on a simple flat plane, and that works fine, but when I try the terrain mesh it doesn't seem to hit anything. After a little bit of testing, it seems like the raycast doesn't work on a mesh with a lot of small vertices, because when I made this mesh with only a few larger vertices it works fine.
Am I doing something wrong, or is what I want simply not possible?
206f842aa28a4099af17dcc8d76affc8.png
(388.1 kB)
screenshot-1.png
(232.0 kB)
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612103823im_/https://answers.unity.com/themes/thub/images/avi.jpg)