# Question directed towards Upu

**URL:** <https://forum.kirupa.com/t/question-directed-towards-upu/2869>\
**Category:** Uncategorized\
**Created:** [March 21, 2002, 4:04am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869 "2002-03-21T04:04:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 21, 2002, 4:04am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/1 "2002-03-21T04:04:08Z")

</div>

But if anyone else knows the answer I’ll gladly accept a response. I’m a little rusty on my physics. I want to have two dynamic text boxes one for angle and one for velocity, and when the player presses the enter button, it propels a MC across the stage, in an ARCH fashion using the angle and velocity inputted by the user. Like Upu’s B-ball game. I don’t just want a code, i just want some help on how to go about this. Like how to use Velocities and arching angles, i’m pretty sure it had to do with physics, but I’m not sure how to go about the code. I already know how to do the input boxes, its just the motion code that I need help on. thanks in advance.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 21, 2002, 5:33am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/2 "2002-03-21T05:33:16Z")

</div>

Sorry man… I’ll bet I told you I would get you the code for this. I will, I just need to remember when I’m on at my home computer. I’ll be sure to send you the bball game when I get home and then you can disect it to your hearts content.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 21, 2002, 5:34am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/3 "2002-03-21T05:34:04Z")

</div>

oh… and to say that you have a question for me because your physics are rusty is laughable… my physics are none existent. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 21, 2002, 5:36am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/4 "2002-03-21T05:36:05Z")

</div>

You want a physics explanation of gravitation ? Don’t tempt me… Maudit, I can’t resist to show off a bit.\r\rOK, so basically, the gravitation field is a vector field. This means that wherever you are in space, there’s a vector associated with your position, and this vector, homogenous to an acceleration, creates a force, equal to mass\*vector.

```auto
 Force = m*g //I'm putting this as code :) \r\rBut you surely know that the sum of forces = mass*acceleration hence :\r\rForce = m*a\r\rm*a=m*g and a=g.\r\rThe integral of acceleration on time is velocity, so you get v = g*t + v0\r\rThe integral of velocity on time is position, so you get y = 1/2*g*t^2+v0*t+x0

```

Yes, that’s the \_y position of your object !! On the \_x axis, much more simple, as velocity is constant. You’ll get something like :

```auto
 &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp vely += g*(time elapsed)/1000;\r\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _y += vely;\r\r _x += velx;

```

Did this help, or did it confuse you ??\r\rpom 0]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 21, 2002, 6:16am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/5 "2002-03-21T06:16:25Z")

</div>

Does that work?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 21, 2002, 1:09pm UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/6 "2002-03-21T13:09:10Z")

</div>

ok thanks Pom, and thanks Upu. well I figured that the arching motion was done with some simple physics equations. Or at least they can be done with simple physics. I’ll play around with what Pom gave me later, but I’m going home for spring break tomorrow, and I might not have flash on that computer. ok thanks again. And upu, whenever you have time you can send it. no rush. thanks 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 21, 2002, 7:35pm UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/7 "2002-03-21T19:35:30Z")

</div>

Upu, if (big if;) ) you remember to send that fla sometime before Arpril 1st, could you please send it to [BohicaORF@yahoo.com](mailto:BohicaORF@yahoo.com) and [jedick1@binghamton.edu](mailto:jedick1@binghamton.edu) because for the next week Im going to be home, and the yahoo acount is the only one that I can access at my home computer. thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 22, 2002, 2:25am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/8 "2002-03-22T02:25:13Z")

</div>

I sent it to both of those addresses.\r\rThe basics of it are far more simple than what Pom provided. Most of the time physics can be imitated rather than actually used.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 22, 2002, 2:41am UTC](https://forum.kirupa.com/t/question-directed-towards-upu/2869/9 "2002-03-22T02:41:48Z")

</div>

thanks upu. i already have the basics of the game made, and now all i need is the code. 🙂 i’ll let you know when its done.
