Collisions not sending messages

Hello everyone,

So I heard KING released their engine so I had to try it. I am trying to port my current project to this engine since it is a 2D mobile game, however, I am hitting a snag. I was following the “Platformer” tutorial and everything was going fine until I tried to add the collision response to the unit against the ground.

I have a unit with a box collider of type “kinematic” with group “unit” and mask of “terrain”. I also have some objects with a box collider in the scene of type “static” with group “terrain” and mask “unit”. I also attached a script to the units, and here is the snippet I am using within that script:

function on_message(self, message_id, message, sender)

print("GOT A MESSAGE");

-- check if we received a contact point message. One message for each contact point
if message_id == hash("contact_point_response") then
    if message.group == hash("terrain") then
   		
        handle_geometry_contact(self, message.normal, message.distance);
    end
end

end

However, I do not even see the “GOT A MESSAGE” log once, even though I see the objects go through each other.

PLEASE HELP I AM GOING MAD!!!

Did you find physics > enable inside the game.project file? That might help you seen what’s happening. A collider which collides with something will broadcast messages within the same game object instance it is attached to.

Excuse me? What is “Physics Enable”? I do not see this setting under the game.project file.

The only boolean I see here is “Debug”

My mistake, that’s what I meant, sorry. It’s 5 in the morning. :wink:

I put it on and I see the boxes. Looks good. Just doesn’t follow the collision rules / send messages.

OMG NVM I SEE THE ISSUE.

The collision doesn’t get scaled when I scale the game object…

1 Like

I am 100% sure that it is bugged. Scaling a game object does not scale the game object’s collision object.

Sorry about that, I will add a ticket for it. Is it when you scale in the editor, at runtime (go.set_scale) or both?

In editor. I assume in both though

I think this is the same issue as you are describing.

If you set the Z scale to the same as X and Y it will work. 2,2,2 for twice the size etc.

Oooo yeah but I need to scale just 1 sometimes :\

There’s unfortunately no support for non uniform scaling at the moment.