Physics

Blitz3D Forums/Blitz3D Programming/Physics

RayTracer(Posted 2003) [#1]
Could somebody tell me how to mimic the phisics of a grenade that when it is trown it bounces of objects until it comes to a stop


EviLToYLeT(Posted 2003) [#2]
well hopefully you know some introductory physics. All thrown objects follow the path of a parabola, defined by

x=x0+Vi*t+1/2at^2

where x is the total distance, x0 is the starting position, Vi is the initial velocity a is the acceleration and t is the time.

You apply the same equation for the y, except using -9.8 for acceleration.

once that's modelled, you can set how you would like the grenade to bounce off an object. which would be half a prabola in the other direction. hopefully that'll get oyu started.


poopla(Posted 2003) [#3]
Not the physics he was refering too :). Theres an example in the archives.


RayTracer(Posted 2003) [#4]
Thanks ,i got it now .Mixed the code from the archives with the ecuation