1

Cocos2D内でSpaceManagerを備えたChipmunkを使用しています。インパルスで動き回っているボディがあります。そのボディの位置を使用して、Cocos2Dの視差ノードを駆動できるようにしたいと思います。

So, when body 'a' moves to the left, the parallax follows but with a small time offset, or elastic effect. If you know AS3 and Flash, you can think of this as using a movieclip's x and y location to drive a constantly updating tween with an ease out effect. This is what I'd like to achieve, and after no sleep trying to work it out last night I've decided to ask you much more experienced people :)

Thanks.

4

2 に答える 2

0

追加のボディを視差ノードに関連付け、a適切なジョイントまたはジョイント セットでボディにアタッチすることができます。探している正確な動作を質問から判断するのは困難ですが、スライド、溝、または減衰スプリングの制約の少なくとも 1 つがうまくいくはずです。

于 2010-07-18T10:06:52.483 に答える
0

他の人が使用する必要がある場合に備えて、将来の参考のために、私はこれを解決しました:

[voidNode setPosition:(yourShape.position)];

于 2010-07-18T14:07:27.403 に答える