Need Some Help With Part CFrame Math

I know there is definitely a math function for this, but I’m not familiar with the best way to go about doing this.

Say I had a rectangle part, and I only have the CFrames of where the corners are supposed to be. How do I place and rotate the part’s CFrame so that the corners are in the target points?

1 Like

Just bumping this post here…

You get the difference between your target points and lerp them

I believe the below post could be of help to you. It’s not directly on the topic of CFrames, but it covers some vector math which is really the basis for CFrames in Roblox. More specifically, CFrames build upon Vector3’s, using them for their positional component.

The post:

This is a great “need to know” post on CFrames in particular: Reddit - Dive into anything

That doesn’t account for rotation. The issue is angular. I need to know what angles XYZ my part needs to be, to get the corners to the target position.

I know how CFrames and Vectors work, I just need assistance with this particular problem