How to implement collision detection on Babylon.js Editor v4.0

Hi, @julien-moreau

Great thanks for Babylon.js Editor v4.0.0. I cloned the repo and build it myself.

I’m making a simple ping pong game on Editor v4.

I’d like to add collision detection, which is similar to “onCollisionEnter” on Unity.

But I could not find how to implement.

Any comments will help me. Thanks in advance.

Ref: I introduce the editor to Japanese.

https://www.crossroad-tech.com/entry/babylonjs-editor-4beta2-make-game1

https://www.crossroad-tech.com/entry/babylonjs-editor-4beta2-review

2 Likes

Hey @Limes2018,
Thanks a lot for all these refs!!

I found that documentation about collisions: Intersect Collisions - mesh - Babylon.js Documentation
Maybe we can ask @RaananW for more informations if a collision event exists.

Also, I know that you can use the action manager to triggers actions “on intersect mesh” etc. Use Actions - Babylon.js Documentation
see “OnIntersectionEnterTrigger” and “OnIntersectionExitTrigger”

1 Like

@julien-moreau

Thanks a lot for quick reply! I remembered action manager.

I’ll share my blog post soon after my game has been completed :slight_smile:

@julien-moreau

Thanks to getting your advice, I have implemented a collision feature by using “intersectsMesh”.

Here is the result. I’ll add score, time and etc.
I’ll post how to implement the whole feature in my blog.

Hey @Limes2018 that’s awesome !!!
Can’t wait to read your final post!!

I would love to get your feedbacks from your experience using the editor and your ideas to how we can improve it :slight_smile:

If you have any question don’t hesitate :slight_smile:

Thanks again

1 Like

@julien-moreau

I’m very glad to hear your comment!! Here is about collision detection.

https://www.crossroad-tech.com/entry/babylonjs-editor-4beta2-make-game3

Final post including title, score, and something will be soon.

I would love to get your feedbacks from your experience using the editor and your ideas to how we can improve it :slight_smile:
If you have any question don’t hesitate :slight_smile:

Thanks! I have a few question and ideas about the editor. I’ll share other forum post because it’s not related with the title " How to implement collision detection on Babylon.js Editor v4.0"

That’s awesome!

For the scores, the Editor doesn’t have any support of GUI at the moment. That means you’ll have to create the GUI via the main code of the game instead of using attached scripts.

@julien-moreau

the Editor doesn’t have any support of GUI at the moment.

Thanks for support. I felt like that so I’ll implement my GUI by referring the following articles.

https://doc.babylonjs.com/how_to/gui

https://doc.babylonjs.com/how_to/page11

I’ll share not only final my blog post but also BJS Editor’s project files on GitHub.