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.

explanation

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

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -