I want to place a cube a certain distance form the player and at a point defined by a raycast going from the camera.
I do a raycast that is rotated so it is following the camera’s rotation and I create a simple cube at the hit point. Now the cube is created but since its origin is in the center it is half sunk into the object it was created on.
I need it to be placed on the object I’m facing and not sunk into it. I am not sure how I’d do this since the hit normal doesn’t really fix the problem. Any ideas?
Please ask if you don’t understand the question.