Author Topic: Cannon ball ?  (Read 1788 times)

0 Members and 1 Guest are viewing this topic.

Aurel

  • Guest
Cannon ball ?
« on: August 15, 2014, 06:46:03 AM »
Hi
I would like to know how plot cannon ball trajectory like is on picture.
i mean is there any simple formula for small program?
well i ask because i am so stupid for this mathematic things  :-\
thanks

.

Charles Pegge

  • Guest
Re: Cannon ball ?
« Reply #1 on: August 15, 2014, 07:01:52 AM »
Hi Aurel,

To simulate gravity, apply a small constant decrement to the y velocity

for each animation frame:

if pos.y > 0
  pos.x += vel.x
  pos.y += vel.y
  vel.y   -= grav.y
else
  'landed!
  vel.x=0
  vel.y=0
end if

Mike Lobanovsky

  • Guest
Re: Cannon ball ?
« Reply #2 on: August 15, 2014, 07:10:09 AM »
The World of Tanks on the horizon?

BTW WOT was created and is still being developed in Minsk, Belarus, actually in the same office building where my eldest son's office is located. :)

Aurel

  • Guest
Re: Cannon ball ?
« Reply #3 on: August 15, 2014, 07:53:50 AM »
Quote
The World of Tanks on the horizon?

no Mike i just want calculate how to trow garbage into my neighbour backyard.. ;D ;D ;D

Charles
you can kill me if i understand anything ...and why UDT  ???