Can someone give a joint example - Chipmunk

Can someone please give me a joint example as I cannot find any code for it in tutorials

I want a sprite to have two physics bodies. One inner and one outer. The reason is to stop my vehicle going through my edge physics body wall

Thanks

You may want to check PhysicsTest in cocos2dx test sources: \tests\cpp-tests\Classes\PhysicsTest

2 Likes

I cant find this test folder?

It is in the main directory of your cocos2dx (at the same level as “extensions”, “cocos” or “templates” dirs).

Hehe :stuck_out_tongue_winking_eye: ok, what version of cocos you are using? Did you try to find “tests” directory in subdirectories?

How do I know what cocos am i using. I assumed it was 3 or above ?

And yes looked through everything literally :frowning:

The things you would do for a joint :wink:

It should be really there. I have downloaded cocos v3.14 and tests dir is there.

So where I download it. I did just download it and still didnt see tests ? How did you download it ?

Whatrs file path now from what you just downloaded ?

Ok, I know what is the issue. “tests” is in the main dir in the extracted cocos2dx. Not in the “cocos” in your project.

C drive job is it, in program files or something ?

Click on the top banner of this site :stuck_out_tongue:

http://www.cocos2d-x.org/filedown/cocos2d-x-3.14.1.zip

Whats file path then as I did download this and still cant find tests anywhere ?

O wait a sec. I think I canceled a extract too early
Yes

Ok so lets see if I can find this joint example

The screenshoot you provided is from your “internal”, project specific, cocos2d files.

When you create new project in cocos2dx it copies “cocos2d files” to your project dir. “tests” are not copied - because you don’t need test files in your project.

1 Like