How can i use collider?

i just added a collider.

but there is no way to get a collision detection from script.

i cannot find how to do it from tutorial and this website.

any help plz.

i need a call back function when a contact occurs between my colliders.

i’m using 1.1.1 cocos creator now.

cocos creater is very cool, but tutorials and API set on this website is not updated yet.

when i looked for a camera’s API, the old manual told me there is getCamera function, but not now.

it’s quite difficult to get a info or help.

i had used cocos2d-x as c++, i know what it can do, but it’s difficult to do it on cocos creator. especially script. it’s nightmare for looking a function i want

at least, a manual or tutorial needs to be update with released new version for new comers.

i think it’s important to bring new users.

i just found the article similar with my

1 Like

I feel your pain. I’m starting now with cocos creator and it is very difficult to learn without updated tutorials. There are a few projects in the repository but most of the documentation is in chinese. Very frustrating. If they want us to start using cocos creator a s a tool to create games, the quality of the tutorials/API/Examples/doc must be greatly improved and must be in english. I hope they will fix that soon.

3 Likes

Hi,

I would have to agree with the assessment of documentation / api’s / tutorials for us newcomers concerning the usage of Cocos Creator engine. I’m about 40 % into my game, but now I need to tackle colliders and pooling of objects, however, I can’t seem to find documentation concerning such. I do appreciate the dedication of the Cocos Creator team in their work and creating such wonderful engine, however, in my opinion what makes a good engine besides the upgrades, updates, etc… is documentation, as an example: just look at Unity 3D and their documentation / tutorials…If I’m not mistaken, the main market of Cocos2dx is Asia, particularly China which is great, but if Chukong and their affiliates really want to penetrate the North America / Latin America Region, documentation needs to be vastly improved. A while ago I made a suggestion to the Cocos Creator Team, to have at least a paid PT Programmer that is experience with Javascript / C++ / Lua and of course with Cocos Creator to help answered some questions regarding code on the board, especially for newcomers to the game engine, but I don’t know if it’s economic feasible or will be implemented? Not a lot of people have patience, and when they see documentation is incomplete, or in the todo status, or have to look at examples in the git-hub, they would just leave to another game engine.… I just hope Cocos Creator doesn’t end up like Cocos Director, Cocos Creator engine has a bright future ahead, but documentation needs to be improved. Just my humble opinion…God Bless…

Sincerely,

Sunday

4 Likes

I think they update example cases when new version released or new feature added. While waiting for the documentation, the fastest way is to check there.

The project can be found here https://github.com/cocos-creator/example-cases or from Cocos Creator New Project menu, Example Collection.

1 Like

Hi Misun,

Thanks for the info, much appreciation… :grinning: Currently, I’m working on the colliding part of the game, and using ColliderListener

However, my main question is how can I apply a bounce to my Node when it interacts with other Node that have colliders as well. In other words, right now I’m seeing that the collider is working when they collide, since they changed color, but they go through…I understand that the Physics section of Cocos Creator engine will be implemented in the near future, but I would like to know if someone has a workaround that I can use, I looked at the Cocos Creator API and couldn’t find anything regarding Bounce, maybe I’m missing something in the code, that haven’t implemented yet? Thanks and God Bless…

Sincerely,

Sunday

You can look into open source physics engine like Box2D and Chipmunk and see how they handle clamp and bounce.

1 Like

The english doc is here : http://cocos2d-x.org/docs/editors_and_tools/creator/.
English collider document will update soon.

Collider was simply design to detect collision, you need do your logic in the collison callback “onCollisionEnter”, “onCollisionStay”, “onCollisionExit”.

1 Like

it really helps
thanks a lot

This is a really great suggestion!

Hi,

Yes, understood regarding the Collider and Logic…Thanks…God Bless…

Sincerely,

Sunday

Hi @ nantas2,

So, I can go ahead and require the chipmunk module through code, apply the space, body, physics ( mass, density, etc…) and it will work in conjunction with the current collider components in Cocos Creator? Can I use this as an example: Chipmunk

Thanks and God Bless…

Sincerely,

Sunday