Find CFrame Median

Hello Hello! First off; i will not use physics, it’s the entire reason im hard-coding it.

I am trying to re-create my boat physics in cframes, heres the issue:


how would i create a cframe, thats in the middle of (i already know how to properly position) those 4, with a MEDIAN rotation, so, sort of an average of pointing into each corner; like this:

If it helps, i already calculate the back (back left and back right) Cframe, and the front (front left and front right) cframe.

call the red 3d point A, the purple point B, the bright lime green C, and the other D, then the CFrame is

local avgPosition = 0.25*((A+B+C+D)
CFrame.lookAt(avgPosition, avgPosition+((B-A):Cross(C-A)))

does not result in correct orientation, i took a little time to think about lerps, that resulted in correct orientation.


(blue is your code, orange is the lerp)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.