开发者

deflect the ball in same incoming direction

ballVelocity.y = -ballVelocity.y

this above statement makes the ball deflect ,similar to pong game but开发者_运维问答 ..

I am stuck in making the ball deflect the same direction as the incoming direction ..


Negate the x velocity as well, as in ballVelocity.x = -ballVelocity.x.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜