문제

I'm looking for "MouseJoints" or an equivalent in the new version of cocos2d (3.0) for iOS which use the Chipmunk physics library instead of Box2d. Is there anything like this? Thanks in advance!

도움이 되었습니까?

해결책

For our tutorial chapter on firing a catapult by touch interaction I use a regular CCNode that follows the user's touches and create a joint between that Node and the catapult arm.

This sufficiently replaces a MouseJoint.

다른 팁

I used this is how I implemented it and posted on rotategears blog.

Basically I created a sprite that represents the user input and made the sprite follow the users touch points. Make sure to remove the joint at TouchEnded.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top