|
| 02 Jul 2016 06:02 PM |
How would you make a part that connects 2 points?
Example: Point A = (34, 45, 109) Point B = (21, 43, 65) One end of the part would be touching point A and the other end would be touching point B. |
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
| |
|
| |
|
Slydexia
|
  |
| Joined: 10 Aug 2010 |
| Total Posts: 98517 |
|
|
| 03 Jul 2016 04:06 PM |
Distance = (Point A - Point B).magnitude part.CFrame = CFrame.new(Point A, Point B) + CFrame.new(Point A, Point B).lookVector * Distance/2 part.Size = Vector3.new(1,1,Distance)
there's probably some super short nerd way of doing it too but this is what i assumed you asked for |
|
|
| Report Abuse |
|
|
|
| 03 Jul 2016 04:23 PM |
Distance = (PointA - PointB).magnitude part.Size = Vector3.new(1, 1, Distance) part.CFrame = CFrame.new(PointA, PointB) * CFrame.new(0, 0, -Distance/2) |
|
|
| Report Abuse |
|
|
Slydexia
|
  |
| Joined: 10 Aug 2010 |
| Total Posts: 98517 |
|
|
| 03 Jul 2016 04:27 PM |
| looks like we can't get shorter than jarod's method so i guess i'm on the right track |
|
|
| Report Abuse |
|
|