solvar
|
  |
| Joined: 22 May 2011 |
| Total Posts: 149 |
|
|
| 06 Jun 2014 04:09 PM |
Ok so I am building a game that involves cannon and I also just finished taking Algebra I in school and learning about parabolas and all that good stuff... Anyway I was wondering if I would be able to apply algebra to roblox in a script to make an arching cannonball,
So would a use a quadratic equation like this?
x^2 + x
And hints or ideas would be greatly apprectitated
Thanks, -Solvar |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2014 04:12 PM |
you can try your algebraic equations by using print(equation here)
such as x=2 y=5 print(x+y) or whatever |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2014 04:12 PM |
If you use velocity and just calculate the barrel angle needed to reach the point given the applied velocity, the physics engine will take care of the arching for you
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2014 04:12 PM |
| i just noticed i probably just hinted the obvious |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2014 04:13 PM |
Using quadratic equations could be a possibility, but let me remember you roblox has a physics engine, which means, a part will drop.
Just give it a velocity, I doubt you need any raycasting stuff, a simple cannonball can easily be edited from the roblox slingshot.
Plugin Developer | Builder | Musician
|
|
|
| Report Abuse |
|
|
solvar
|
  |
| Joined: 22 May 2011 |
| Total Posts: 149 |
|
|
| 06 Jun 2014 04:16 PM |
| The thing is whenever I use body velocity it just floats? It won't do any dropping unless the velocity is disabled or removed... |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2014 04:18 PM |
| Simply fix the amount of force you give to the bodyvelocity. |
|
|
| Report Abuse |
|
|
solvar
|
  |
| Joined: 22 May 2011 |
| Total Posts: 149 |
|
|
| 06 Jun 2014 04:19 PM |
| Oh ya lol forgot about that I normall just set it to inf geez smart one lol thanks I'll try that soon and tell you the result |
|
|
| Report Abuse |
|
|
solvar
|
  |
| Joined: 22 May 2011 |
| Total Posts: 149 |
|
|
| 06 Jun 2014 04:35 PM |
| OK well Roblox crashed when I thought I almost had it right so I will look into it but I think I got the right Idea so thanks! |
|
|
| Report Abuse |
|
|