Help with Custom Ray Casting

So I’m using @Galactian Raycast bundle for drawing the ray, but I wanted to make more than 1 so instead of using an Attacher I had the lines preloaded into the game and moved the lines X and Y position to the player object. Obviously, that didn’t work so I displaced it a little, and for a straight line, it works perfectly now. The problem happens when I try to have an angle to the line. I want it to work like a normal raycast except visible. What’s going wrong is that the center of the Line is not directly on the object so when it rotates it rotates off of the object creating an hourglass effect

Any ideas to fix this

@JR01 not sure if you have any ideas or have done something similar. If you need I can give you the link to the game.


it’s not possible to do this without listing the position of each object and making an ai that can figure out what block it’s closest too

(or you could just lock the position of the angle to to a grid of 32 and use that)


I figured it out and it works amazingly, if you want I can PM you the game link (It might end up being a secret project)