RiderjJoin Date: 2011-08-15 Post Count: 1534 |
I'm not too sure how to do this.
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
I need it, derp?
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
That is some complicated math, would it be best just to manually CFrame the parts?
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
koolsJoin Date: 2009-01-11 Post Count: 1659 |
Do you want the arches to be curved as a half-circle or a more oval-curved one? |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
Well I do not comprehend that formula. I will search on the wiki but I do not think I will have any luck. Though It never hurts to try, I do know there is a lot of formulas in the terrain generations.
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
A Curve between point A and B, no matter how far apart they are the curve will fit it(If the parts are the right size ETC.)
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
Will linear interpolation work?
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
"Will linear interpolation work?"
That'll give you a straight line between 2 points. |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
Just realized that, Guess I will have to make sense of that formula. Thanks for helping, Wish me luck.
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
You can maybe use a quadratic equation to do that? |
|
AgentFirefoxTop 100 PosterJoin Date: 2008-06-20 Post Count: 22404 |
I've got a small formula for circles on planes XY, XZ, or YZ. I'm still not sure of a formula for circles on ANY plane. |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
Why does coding have to be so complicated -.-
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
"Why does coding have to be so complicated -.-"
It's not even coding that's the issue here-- more so the math and logic behind it. |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
It is also the coding, I have been doing it for about 4 years on roblox, but I have not gotten anywhere yet. I have had barely any success. Though I will keep trying.
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
Try to adapt the quadratic function to make block show it. I think this form could be useable : y= a(x1+x)(x2+x) |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
Will try it, Most of these formulas do not make sense since I am only in Algebra one :S
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
|
I made one. It doesn't make a perfect semi-circle arc if they Y values are different, but it's still pretty neat.
function drawArc(p1,p2)
local radius = (p1-p2).magnitude/2
for i = 1,180 do
local fraction = i/180
p = Instance.new("Part",workspace)
p.formFactor = "Custom"
p.Size = Vector3.new(1,1,1)
p.Anchored = true
p.CFrame = CFrame.new(p1:Lerp(p2,fraction)+Vector3.new(0,math.sin(math.rad(i))*radius,0),p1:Lerp(p2,.5))
end
end
drawArc(Vector3.new(0,0,0),Vector3.new(10,0,10))
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
@ Swim Thank you, That worked well enough. Just need to work on editing it so it works with my script.
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|
RiderjJoin Date: 2011-08-15 Post Count: 1534 |
Eh your right, it is not a clean arch if the Y is changed... Darn.
[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]] |
|