So, I am making a Minecraft ripoff.
I have a raycast that hits a block. It then places a block inside of that block. I am trying to make it place next to the block in the direction the user is facing.
I got some of that figured out. I use:
to round up the floats. My problem is figuring out what axis to round on. I need it to depend on the direction the player is facing to figure it out.
I tried doing a complicated algorithm to figure out which face of the collider the player is facing, but that didn't work out that well....
How do I solve this? I can't figure it out.