|
| 13 Sep 2015 01:30 PM |
| Does anyone know the math behind CFrame.new(VectorA,VectorB)? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 01:32 PM |
er no actully I have no idea tbh but
CFrame.new(0,10,1) -- creates a position equal to that, along with a rotation equal to 0 which should make the end result
CFrame.new(0,10,1,1,0,0,0,1,0,0,0,1) |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Sep 2015 02:12 PM |
Its graphs
X, Y, Z
#code print ("Shots fired, ready for the war!") -- Currently working on Gui's |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 02:18 PM |
When you do something like CFrame.new(a, b), it does something like this (If I remember correctly)
#code local x,y,z = Point1.X, Point1.Y, Point1.Z local x1,y1,z1 = Point2.X, Point2.Y, Point2.Z local angle_x = math.deg(math.atan2(x1-x,z1-z)) local angle_y = math.deg(math.atan2(x1-x,y1-y))
"Jet Fuel Doesn't Melt Dank Memes" --xCMCxSCOOTALOOx |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 02:26 PM |
| foreboding... I'm not talking about coordinates we all know what those are... I'm asking how a new cframe is generated from a point facing another |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 13 Sep 2015 02:33 PM |
| The angles between the 2 vectors are gotten? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 02:35 PM |
| And and we can use cross product + axis angle rotation? that may work |
|
|
| Report Abuse |
|
|