Other collision problems

Hi, I’ve tried putting back the condition that if you press right while the character is running and touch a wall, for example, you return to the wait state, and it continues doing the same thing as before. It keeps going from the Run state to the wait state, and it keeps detecting a wall where there isn’t one. I remove the condition again and the character moves normally. By the way, I’ve noticed that it continues doing another curious thing: if you stick to a wall and press the jump button, when it falls it’s as if for a moment it detects that it’s on the ground and you can jump again, and so on until you can climb the wall by jumping to the top.:sweat_smile:

It’s an easy-to-reproduce bug, and it wasn’t in version 17 because I didn’t notice it until I upgraded to version 18. If you set the object’s fall speed to 100, for example, it will be easier to see.
You can test it with the test project I sent regarding the bullet settings bug and the performance loss, plus the fire button bug (it’s not fixed yet :winking_face_with_tongue: ). Simply add a console text to wait in the wait state and another to run in the run state, and move, and you’ll see what happens. Then, make a high wall, stick to it, and simply press the jump button, and it will be clearly visible.

By the way, the bug also affects enemies. If you set the condition that if it collides with a wall on the right, it will go to the action of walking to the left and vice versa, it enters a loop and starts walking to the right and left.

Can you try the solution presented in this post where you basically change the rotation to another value and then back to 0 of any game objects CollisionShape2D that existed prior to the version change. For some reason when I did that simple thing, the side detection started working properly again.

Hi, I did what the video says and it still isn’t fixed. I’ve modified the test tile so you can see the size of the floor tile and better visualize the behavior. I added text messages so you can see the character’s state. If you look at the output window, you’ll see that it’s going from WAIT to RUN because for some reason it detects a wall. As I said before, I have the condition that if you’re in WAIT and you press the right key, for example, and it doesn’t detect a wall, it goes to RUN. However, sometimes it doesn’t move because it detects a wall that isn’t there. The same happens when you move because I have it set to WAIT if it detects a wall in the direction you’re moving. I also modified the character’s falling speed to better show the jump. If you stick to the wall and press the jump button, when it falls, it detects ground where there isn’t any, and you can continue jumping until you climb the wall. You can also see the behavior on the enemy. Here’s a sample of this project, which I submitted a while ago due to the bullet and fire button bug. Here’s a video showing how it works.

Grabación 2025-08-31 090429.zip (3,9 MB)

Well, I’ve created a new basic object with just the collision and no animations, using the aforementioned logic, and nothing like what I described in my previous comment is happening. I’ll have to try removing the collision and recreating it for all the animations, with the work involved, to see if that fixes it……

Further testing: I deleted the enemy collision from the video I sent and remade it because it was simple; it was just square in every frame, and I still had the error.
Then I tried the solution BAZ gave me, rotating the collision and setting it back to 0, and the error still persisted. Just to test, I set the collision back to 90 and left it like that. I tested the project, and it works fine.
I loaded other projects and did the same, leaving the collision at 90 degrees and it works fine…, this surprised me a lot and I proceeded to load a project from when I started with AGM and it works well using the same logic which made me think and investigate what these projects have in common and this last one does not have in common with the others, I realized that in all except the old project I use the script “ark_agm_rotate_to_velocity.gd” for the automatic rotation of the bullets and I think that for some reason it has ruined the collisions of the objects, by testing it on some objects and then removing it or leaving it on other objects. I think I’ll have to rotate all the collisions to 90 degrees and resize in all the animations, is that or create all the objects from 0 and not use that script again and try to erase any trace of it in the projects…:man_facepalming:

Well, I think I’ve solved my dilemma. The problem is with the scaled objects. If you scale an object, it causes a collision problem. If you return it to its normal scale, it works fine.:man_shrugging:

Thanks for your further testing! Could you please help me confirm whether the ark_agm_rotate_to_velocity script interferes with the collision rules operation of AGM? It’s a script I wrote a long time ago. If an object itself is rotated, its attached collision body indeed rotates along with it. If this situation causes problems, I think I need to add some notes to the original forum plugin post.

Does this scaling refer to the GameObject or the CollisionShape? Or is this issue only encountered when using different scaling ratios for X and Y?

Hi, I’ll run more tests, but I think the script has nothing to do with it. The problem arises when you change the object’s scale. Normally, the scale is 1/1. If you set it to 0.5/0.5, for example, like I had set, problems with wall detection begin. This can be a problem if you want to scale an object and move it around the stage. If you scale it, the same problems I mentioned in the video occur. I’m asking you to take a look at the issue. On the other hand, I think autorotation should be integrated into the engine, as was already the case in PGM.

I made some attempts and initially couldn’t reproduce the issue. However, under conditions mixing left and right collision detection and using a 0.5x scaled GameObject, I finally discovered some abnormal behavior. There is clearly a bug here (I will report it), but currently, I can’t be sure if the issue I encountered is the same as yours. Therefore, it would be better if you could share your minimal reproduction project, but if it’s inconvenient, that’s okay too.

Sent. It’s the same project I sent due to the performance loss issue with the bullet settings, and they also detected a problem with the fire button. By the way, the bullet issue still hasn’t been fixed.:winking_face_with_tongue:

The glitchy movement I was able to resolve by a few tweaks:

  • Remove the 0% speeds from the Wait, for some reason if it is set to 0% speed, it seems to ignore input or something. I need to look into that more

  • Needed to add a visible_direction check with the stop run right/left conditions:

Detecting the wall is still troublesome though… I’ll keep investigating:

Hi, I already discussed what happens when you set the speed to 0 a few weeks ago in this Steam post:

And the “ghost” collision issue in my project has to do with the character’s scale. In the project I sent, the character is scaled 0.5/0.5. If you set it to 1/1, which is its actual scale, the “ghost” detection issue is resolved both when moving and jumping, and it works perfectly without any modifications. Load the project without modifications and simply change the scale, and you’ll see that it works without problems. The problem is when you scale the character; if you do that, you have a problem with collisions.

Understood, I see what you are talking about now. Jumping against the wall and it triggers bottom wall detection somehow when scale is isn’t 1.0

The issues seen in this video I previously uploaded, both when moving and jumping, are resolved by restoring the object’s scale to 1/1 without having to modify the game’s actions. This fixes both the character and the enemy.
The issue is with collisions when scaling objects.
I hope this helps understand what I’m explaining because Google translations between languages ​​are sometimes awkward.

Grabación 2025-08-31 090429.zip (3,9 MB)

Yes, I’m sorry for the added confusion. The bug report is still in for your issue.