how to make an object bounce without making it a physics body

I have a ball placed on water. upon clicking the ball, it ‘jumps’ and falls back on the water surface, goes a little deep into the water, and after a few oscillations comes back to it’s original position…

How can I achieve this without making the ball a physics body? [import]uid: 175611 topic_id: 31753 reply_id: 331753[/import]

I would use 2 variables - ySpeed and yAccel.
upon the first touch, give the ball an initial ySpeed of lets say -10 (assuming your ball is jumping up)
then each update/enterFrame or whatever, update the ball y location according to ySpeed AND update the ySpeed according to yAccel, which also should be initialized to, let’s say, 2.

ball.y = ball.y + ySpeed
ySpeed = ySpeed + yAccel

yAccel should remain constant until the ball gets back to the water, and then changes to something like -3 or -4 (the acceleration in the water is stronger and in the opposite direction). [import]uid: 150930 topic_id: 31753 reply_id: 126787[/import]

Interesting, thanks a lot. [import]uid: 175611 topic_id: 31753 reply_id: 126860[/import]

I would use 2 variables - ySpeed and yAccel.
upon the first touch, give the ball an initial ySpeed of lets say -10 (assuming your ball is jumping up)
then each update/enterFrame or whatever, update the ball y location according to ySpeed AND update the ySpeed according to yAccel, which also should be initialized to, let’s say, 2.

ball.y = ball.y + ySpeed
ySpeed = ySpeed + yAccel

yAccel should remain constant until the ball gets back to the water, and then changes to something like -3 or -4 (the acceleration in the water is stronger and in the opposite direction). [import]uid: 150930 topic_id: 31753 reply_id: 126787[/import]

Interesting, thanks a lot. [import]uid: 175611 topic_id: 31753 reply_id: 126860[/import]