Defold need collection of small examples

Thank you! Now I see how to use raycast.

1 Like

Added a collection proxy example: https://www.defold.com/examples/collection/proxy/

4 Likes

Got to say I got some problems with URLs.
Menu and levels couldn’t send msg to the controller (proxy loader GO). In the example, you have “proxy:/controller#controller” and even building everything like the example it didn’t work and after using print for actual URL, I used “main:/controller#controller”.
P.S. Why in example left mouse is “touch”, if the default is “click”? That can throw off newbies.

You must pay attention to the id you assign to a collection (not the filename but the id). If you open a collection and select the root of the collection in the outline there’s a name/id in the properties panel. Make sure it is "proxy"and not “main”.

2 Likes

Now I see it, but I think it should be either specifically pointed out (since no mention about proxy collection name) or it’s redundant to make specific collection since there already is main.collection in a new project.
Also:

  1. Send a show_level1 message to the controller script component in the proxy collection.

should stress that sending messages need to have [proxy collection name]:/controller#controller.

Sure, we could be even more explicit.

2 Likes