minkmink
(minkmink)
May 19, 2023, 2:59am
#1
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.
CoderHusk
(CoderHusk)
May 19, 2023, 5:31am
#2
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)))
minkmink
(minkmink)
May 19, 2023, 5:47am
#3
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)
system
(system)
Closed
June 2, 2023, 5:47am
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.