- Home /
RayCast Help
Hello,
i'm currently working on something which indicates the "hit.point" and draws a plane on this position. Everything works, except of one little "bug". For example i want to draw the plane on a wall, the plane will be created in the wall. This means the plane and the wall are flickering. I need to change the coordinates of the hit.point, but these depends on my current position and viewangles. Is there anyway to shorten the ray? Like 0.01f, so the Plane is not spawning in the wall?!
Thanks for help!
Comment
Best Answer
Answer by robertbu · May 14, 2014 at 06:53 PM
Calculate the position as:
hit.point + hit.normal * 0.01f;
I assume you are handling the rotation to align with the normal?