javascript - Bounce a ball from one point to another - Vector and Acceleration -
i have ball drops point, should bounce , reach point.
my ball starts acceleration towards first point, hits point , bounces off left side. want velocity & acceleration applied ball after hitting first point, both has bouncing effect, , reaches it's destination (doesn't go offside, bright trail).
i have linear vector between points, coordinates of points , angle between them.
first figure out how long take higher point lower point solving t
:
at2 + viyt = dy
then take t
, use our lateral velocity:
vx = dx / t
once have lateral velocity, slice time finely , move ball each calculated point in turn.
Comments
Post a Comment