|
| 15 Nov 2011 03:14 PM |
Sorry if I'm a little vague here.
I have two points at random places in a Vector3 space. What I need to do is find an oval that's: - Center lies halfway between the points on the XZ axis - Center lies on the Y axis of the lower of the two points - Circumference touches both points Then, I need to make a Part travel from the first point to the second point, traveling along the oval's edge. I know some basic trig, but I'm at a loss here. Help? Anyone? |
|
|
| Report Abuse |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 15 Nov 2011 03:18 PM |
| Could you possibly draw a picture and upload it? I can't quite tell exactly what it is you're looking for. |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2011 03:18 PM |
| I lack a ton in the math portion, but I do know that you can use Vector3's lerp method to find center points |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2011 03:34 PM |
I'm not familiar with the lerp method, I was going to just halve the XZ distance between them and use the lower point's Y axis. Here's a pic: http://www.roblox.com/Circle-Path-item?id=65803609 |
|
|
| Report Abuse |
|
|
|
| 15 Nov 2011 03:39 PM |
Here's my idea, anyways: - Find the radius of the oval between the center and point1 and the center and point2 - Somehow (:/) use this to find the vertical radius - Win from there. |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Nov 2011 04:23 PM |
You don't have to worry about 3D since its in 2D anyway. You can just use rectangular coordinates for drawing the ellipse. And the maximum radius would be the two points with the center and just interpolate between the points with the ellipse equation. Maybe you need to define it locally.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Nov 2011 04:32 PM |
| It is 3D but still 2D! Because Ellipse is always 2D. What you want is to draw in the Ellipse in XZ axis and then translate the height accordingly based on how much you want the ellipse to be rotated about i.e. angle between the projection of the vectors. |
|
|
| Report Abuse |
|
|