I’m currently working on finishing up my wall placement system but I’m experiencing a small issue where multiplying a CFrame by another CFrame gives me a very slight offset when filling in the gap at the end of the wall:
As you can see here, the part is shifted ever so slightly to the right, it represents the edge at the end of the wall
To generate the part:
Which gives me this, note the edge at the very top of the sphere ends where the wall ends:
Can someone explain why this is happening? I would pass it off as a floating point error but it’s something actually visible and would have an impact on the user and the system as a whole.
I think if you could send some template file that presents this problem, it would be easier to investigate. I tried on reproducing but I can’t get the same result.
Press run and you’ll see these two points appear on the generated wall, the green one is the intended behaviour whereas the red one is the unintended behaviour:
I’ve given it a look, I can’t notice any mistakes. However the entire code is pretty big and I could be missing some context.
I think it would be useful if you could repro it to its minimal form, this way you will also understand the exact reason this takes place. I’m assuming it’s related to the logic of your script, since if you take the very minimal example where you just place a part in a wall, it always works finely (using the code example you gave):
Yeah that’s what happened to me as well, I tried just placing a part and creating the new parts at the proper corners and they placed correctly. It isn’t a big deal though since using RightVectors and LookVectors works fine, just a bit inconvenient especially because I don’t know why it’s happening.
I’ll check again tomorrow tho, it’s 4 am so it’s probably just brain fog.
In the docs:
Returns the composition of two CFrames.
Proceeding CFrames are offset in relative object space by preceding CFrames when multiplied together.
This explains it as you probably have a position value which both add up together when you multiply the CFrame.