Some very welcome additions this round, thank you!
I recall seeing several posts on the forums noting that the majority of physics engines don’t support something like this, and that if you need to change an game object’s collision properties, you should create multiple different collision objects. What was the catalyst for this feature to be added? Was the underlying Box2D engine modified to support it, or was it entirely a Defold limitation?
This is a fantastic change. Oftentimes I have hundreds or thousands of collide-able game objects that are dynamically spawned without a script to improve performance. Unfortunately, I still had to create separate script files for them because although I didn’t need to implement an update()
function, I still needed to implement an on_message()
function to handle collision messages. Now I will be able to do that without creating those additional script files.
(Technically, collision messages could be handled without a separate script, but if you have multiple different types of collide-able enemies but only a single collision mask shared between them, then it’s not so easy to differentiate which type of enemy you’re colliding with, hence having a separate on_message()
function per enemy type.)