Collision not working for some objects

Before proceeding, please use the forum search feature at the top of the page to check if your question has already been answered.

How do I…

I have a pedal, a player, and a box in the game scene. When any object is on the pedal (either the player or the box), it should be activated, like what is shown in image (b). It works well when the player is on it. But when the box is on it, the pedal only shows the last frame of the “idle” animation (see image(c)), which should be the “activate” animation.

Is there anything I did wrong?

Thank you.

Welcome. In your final event try switching the order of the objects in the collision condition from box is in collision with control_pedal to control_pedal is in collision with box.

The order doesn’t usually matter but it does when it’s inverted with multiple instances.

It can get complicated. It’s not as easy as saying is this touching this when there are instances and it’s inverted. It is box not in collision with all of the controls. Say there were 3 boxes. One box could be in collision while 2 are not in collision. So, while the one is in collision the other 2 aren’t so it doesn’t know which ones you’re interested in.

It’s still confuses me from time to time. I just know that sometimes swapping the order can fix it. Other times, you need to use a NOT condition with a non inverted collision condition. Other times it helps to use a for each object to narrow down the specific objects. Or a second condition so it picks specific instances.

Again, it can be complex. Or at least hard for me to explain.

1 Like