Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

RayCast

Hello Guys, i need to know how can i make the Ray Cast emission by angle not a straight line

need help here😀

Best Answer

  • MouledouxMouledoux Member
    Accepted Answer

    just give it a different direction.

    Instead of shooting the ray transform.forward, you could to transform.forward + transform.right (this will be 45deg)

    Or transform.forward + (transform.right * 0.5) here, we've lowered the amount of 'right' were adding to it, so instead of 45, its more like 22deg. You can raise or lower that '0.5' value to adjust the angle, and even make it negative to change if its going left or right.

Answers

Sign In or Register to comment.