- Home /
Question by
alexander11 · Jul 19, 2016 at 02:45 AM ·
c#unity 5mesh3dlinerenderer
How do i cast mesh like a linerenderer?
Hello anyone know how to cast mesh like a lineRenderer??
Comment
What du you mean "cast"? Do you mean "render"? Try a wireframe shader.
Casting as from one point to a specified direction.
Ok, I understand now. Well, there is no built-in function for this, but you can use Physics.BoxCast, Physics.CapsuleCast etc. Other than that , I don't see a way to make it work in an efficient manner. You could cast from every vertex, but that would potentially ignore colliders resting between the rays. You could approximate the shape of the mesh by "pixelating" it so you get many more raycasts in a grid, but that might kill the FPS.