Object standing still in world with only triggers keeps sending collision responses repeatedly?

Hello everyone,

The title sums it up. I have a game which currently only contains triggers as collision objects. Yet when I spawn certain objects, even though they don’t even move at all, they continuously receive collision messages.

There are two things that may contribute to this, although I’m unsure if they’re involved at all. They are:

  1. I have a very large number of objects running in the game at once. I’d guess a thousand +/- 500. Almost all very simple and small but a lot nonetheless. I don’t know if this affects how the physics is processed.

  2. Some of the objects get rotated using go.set on the euler property. I don’t see how this could cause it but it’s the only other thing. Even then, objects will still receive collision responses if they don’t get rotated.

I’m actually at a loss at this point. I’d appreciate any help.

Which kind of message? Trigger Response messages?

This would be easy to rule out. What if you reduce the number of objects to 10? Still the same behavior?

I think if you rotate an object it will not come to rest in the physics simulation.

  1. Collision response messages. Not trigger response, collision responses. After doing some debugging it looks like the object keeps getting the messages from the other objects it’s touching. In fact, anything collision object that overlaps with it becomes a part of these collision messages as long as it’s on it. I moved my player onto it and stood still so the collision objects overlapped and sure enough, it began continuously receiving collision response messages from the player. All of the objects it’s touching have their collision objects set to triggers mind you, including the player, none are in collision mode. None are moving.

  2. I did what I could to reduce the number of objects in the level, but the messages are still coming out.

  3. Yeah, don’t know. But they do they get rotated and then stay still.

Can you share the project here as a zip file?

Circuit_chase_compressed.zip (1.7 MB)

Here you go.

Beware that the code is a rat’s nest.

Wait a couple of minutes for the level to finish generating. In the console, after this time, you should see a message id (it will say collision_response), the id of the other object involved in the collision, and the position of that object.

The object recording that data is the charge spawner, not the diode, but the diode is the only other component coded to print out anything about these collisions. Other objects, such as the capacitor, inductor, and fuse are also receiving collision response messages. These are not printed though. I have not checked whether the joints, wires, and player are receiving these.

If you’d be so kind, I’d also like help with adjusting the field of view of the camera. I tried playing around with its settings but had no luck. I’m guessing it’s a quirk of the mobile resolution.

It seems like a regression that trigger objects also generate collision_response messages. Not sure when they started doing that to be honest.

Do you know of any possible solutions? Could this be a bug with the engine? If so, do you think it could be fixed in the foreseeable future? Thanks.

Yes, it might be. Like I said, it seems like a regression. I don’t remember trigger objects also generating collision response messages.

If so, do you think it could be fixed in the foreseeable future?

Yes, probably. Could you please create a bug report on GitHub so that we can keep track of the issue?

Sure thing, do you have the link to the github?

It’s www.github.com/defold/defold

Hello again Britzl,

No pressure, but I’m just curious as to when I could expect a response to the github page. I don’t know how long it would take to investigate and fix this, but an estimate would be helpful, even if it’ll be a while.

Thanks

We review submitted bugs once a week on Mondays.

It depends on if it is a bug or not. I’m honestly not sure if it has been like this always or if it is a new things.

I could add that we are releasing a new feature where you can explicitly configure which collision events a collision object should generate. This can be used to optimize performance of a physics based game where you want the engine to resolve collisions but where you are not interested in any (or only some) messages.

1 Like