generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Formula to create an arc between two points?

Previous Thread :: Next Thread 
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 04:50 PM
I'm not too sure how to do this.

[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
01 Mar 2012 05:05 PM
Why should we give you such a formula?

~ I don't script, I code ~
Report Abuse
DrAgonmoray is not online. DrAgonmoray
Joined: 29 Jul 2008
Total Posts: 17428
01 Mar 2012 05:08 PM
Google "Bézier curves"
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:09 PM
I need it, derp?



[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
01 Mar 2012 05:10 PM
I faintly remember the wiki having such code.

~ I don't script, I code ~
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:11 PM
That is some complicated math, would it be best just to manually CFrame the parts?

[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
01 Mar 2012 05:11 PM
No, it wouldn't.

~ I don't script, I code ~
Report Abuse
kools is not online. kools
Joined: 11 Jan 2009
Total Posts: 1659
01 Mar 2012 05:12 PM
Do you want the arches to be curved as a half-circle or a more oval-curved one?
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:13 PM
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 ]]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:14 PM
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 ]]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:21 PM
Will linear interpolation work?

[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Report Abuse
DrAgonmoray is not online. DrAgonmoray
Joined: 29 Jul 2008
Total Posts: 17428
01 Mar 2012 05:23 PM
"Will linear interpolation work?"
That'll give you a straight line between 2 points.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:29 PM
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 ]]
Report Abuse
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
01 Mar 2012 05:31 PM
You can maybe use a quadratic equation to do that?
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
01 Mar 2012 05:32 PM
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.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:36 PM
Why does coding have to be so complicated -.-

[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Report Abuse
DrAgonmoray is not online. DrAgonmoray
Joined: 29 Jul 2008
Total Posts: 17428
01 Mar 2012 05:39 PM
"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.
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:44 PM
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 ]]
Report Abuse
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
01 Mar 2012 05:48 PM
Try to adapt the quadratic function to make block show it. I think this form could be useable : y= a(x1+x)(x2+x)
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 05:49 PM
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 ]]
Report Abuse
swimguy777 is not online. swimguy777
Joined: 30 May 2009
Total Posts: 17092
01 Mar 2012 05:54 PM
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::]-
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 06:00 PM
@ 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 ]]
Report Abuse
Riderj is not online. Riderj
Joined: 15 Aug 2011
Total Posts: 1534
01 Mar 2012 06:22 PM
Eh your right, it is not a clean arch if the Y is changed... Darn.

[[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image