开发者

Box2dFlash - How to predict a collison?

开发者 https://www.devze.com 2023-02-01 11:08 出处:网络
I made this monster cool game: Just kidding. My players are interested to see a line that predicts how the ball will bounce of wall 开发者_高级运维or other balls.

I made this monster cool game:

Just kidding.

My players are interested to see a line that predicts how the ball will bounce of wall 开发者_高级运维or other balls.

Is that possible in Box2dFlash?


Its possible using Box2d.

As Todd2d suggests but doesn't demonstrate, is create a parallel box2d world with everything the same then step through several time intervals and record what happens i.e. the position of the ball. You can then iterate through this list of points and draw lines showing where the ball will travel.

This will give the illusion of having predicted its path.

0

精彩评论

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

关注公众号