开发者

How to Implement waving(Like pendulam) ropes effect in COCOS2D?

开发者 https://www.devze.com 2023-03-06 07:57 出处:网络
I am tryin开发者_如何学运维g to implement wave effect when any thing hits the hanging object, how can I achieve the both,:

I am tryin开发者_如何学运维g to implement wave effect when any thing hits the hanging object, how can I achieve the both,:

1.Hang an object in air(as it will be a dynamic body which will wave)

2.implement waving effect on that body

Thank You


The answer isn't in cocos2d but in your physics engine, if you are using box2d check the distance joint. not sure on chipmunk.


in testbed example see the chain example.

u can create no of small boxes and joint them looks like rope.

but be careful while specify the anchorpoint.

0

精彩评论

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

关注公众号