New answers tagged

0

You could start with the 2d equation for the arc of the projectile, represented by some function of time: function getPosition(time) { return { x: xInitial + xInitialVelocity * time, y: yInitial + yInitialVelocity * time + 0.5 * gravity * time * time } } Then to create the 2.5D effect, map the position by multiplying the x position ...


0

The basic implementation of projectile physics doesn't require any trigonometry. First of all, you need to model the movement of your object with a velocity vector. A velocity vector is a structure which stores the velocity of an object on the x-axis and y-axis as spearate values. To move the object by a velocity vector, add the x- and y-value to its x- and ...



Top 50 recent answers are included