Using raycast to make walls look connected

I was just messing around with some objects and raycast in a new game I’m making. It doesn’t matter how you arrange the walls, they still work. It’s also so much easier to make connected walls using raycast instead of having an individual object for each side
Screenshot 2018-06-06 at 4.39.59 PM


This is really cool @SnakeInMyHoot - I love this idea.

I’ve been using this a while, the only problem I had is when I use fake background objects (just objects with lower render layers instead of background objects when they must contain logic) for example grass or other terrain beneath everything, it interferes in strange ways with raycast. But since raycast seems to collide with the sprite’s graphical border, a solution I thoguht of was making objects with an empty texture animation, raycasting the blocks, and then changing then restoring the texture after the raycasting. Glad to see others doing it, you can make kind of smartblocks this way to save time.

This is a great idea, raycasts can do so many cool things!