|
| 30 Dec 2013 11:35 AM |
I am dead stuck on this problem. There are three points of a right triangle (inputted as arguments). I know that if I were to create a WedgePart whose vertices were these three points, the position would be the midpoint of the hypotenuse.
However, the rotation is the difficult part. I want the WedgePart to be oriented so that its three vertices are at the three points inputted.
Put simply, you give any three points that create a right triangle and the function makes a WedgePart whose vertices are those three points.
I have been pondering this for a while, so I am asking if anyone has any ideas? Any help is much appreciated, thanks! |
|
|
| Report Abuse |
|
|
Nagrath99
|
  |
| Joined: 26 Mar 2011 |
| Total Posts: 1537 |
|
|
| 30 Dec 2013 05:19 PM |
| You'd need to be able to stretch parts. (Which you can't, in the way YOU want) |
|
|
| Report Abuse |
|
|
|
| 30 Dec 2013 05:50 PM |
| I know it is possible; I have already figured out the position and size of the brick, the rotation is the tricky part. |
|
|
| Report Abuse |
|
|
|
| 03 Jan 2014 10:17 PM |
Alright so I got it to rotate the right amount except for in one of the axes. I could rotate it manually with one move to fit it into place with a chance of innaccuracy, or I can try to find a function that does it exactly.
Basically, I have a brick facing upright, and another immaginary brick facing at some arbitrary angle. I tried doing inverse trig to get the angle, but that might not have worked because I don't exactly know the lengths (because the entire thing might be rotated, so I can't use global coordinates).
I don't know what to do, and after typing this I doubt anyone will come up with an idea after reading this anyway. But yeah, I have one more angle to close. |
|
|
| Report Abuse |
|
|