I’m working on an house placement system, I’ve already made the “terrain” props placement, and now I’m dealing with the wall prop placament, basically the “wall props” are the paintings, but I’ve a problem with the CFrame of these:
Basically the problem is that when I aim to the wall the paint not mantain its rotation due to the change of the X and Z axis, and I also need to add half of the size of the paint to keep it outside the wall, but actually I tried a lot of CFrame configurations but none of them worked
If I understand you correctly, you’re saying that the rotation resets when the part is moved. If that’s the case, you should adjust the position only when moving the painting and not the CFrame.
You can get this with the normal from a raycast. Cast a ray from the camera position in the mouse’s direction and use CFrame.lookAlong() to look along the Normal, which is a direction (look vector).