1

我正在使用 Cocos2D、SpaceManager 和 Chipmunk。我有一个有 4 层的视差节点,这与可玩的花栗鼠身体的位置有关。该物体需要与其中一个视差层上的静态物体发生碰撞,静态物体必须从屏幕开始,然后移动到屏幕并发生碰撞。

我知道你不应该用花栗鼠移动静态物体,除非你重新哈希。但是,每秒重新散列 60 次以跟上帧速率似乎很混乱。谁能想到另一种方法来做到这一点?

干杯。

4

1 回答 1

0

One thing you could try is joining all the objects in each parallax layer to a non-colliding body using rigid joints. Then move that body along with the parallax layer to drag the objects along. THis may not be the best method, though.

于 2010-07-20T13:06:14.997 回答