[Feature under Review] Collision integers as an option

Currently, when we are entering the hitbox of our objects, the X and Y instructions are floating numbers (like 10.111544548)

The ideal would be to be able to do this so that it stays as a whole number

I know you can adjust this manually. But today I noticed some bugs that occurred in my game and I only found out after checking the collisions and realizing that they should be integers.

For example, pay attention to this small snippet of the video below. The enemy falls after attacking me.

This happened precisely because the numbers in the collision box (X and Y) were not integers.The same happens if the enemy goes down a slope (such as a stone staircase), or he sinks to the ground or gets stuck.

However, I should have recorded a video before fixing all the errors I found related to this, but I didn’t. Sorry.

But the fact is that there could be a way to adjust this automatically, I believe that an option of " collisions integers" could be put there, so whenever dragging the collisions gdevelop would round the numbers to not have this problem of floating numbers.


Well, it would be also nice to fix the floating numbers issue you mention.
Can you reproduce it in an empty project and share that?

The team is aware of the floating numbers, and is currently looking for a solution, I mean this morning we talked about it :wink:

1 Like

Thank you for taking the time to report your issue!

Could you give us more details on why you think this floating numbers cause the issue you’re having?

Hi! Apologies for the delay. But, if you saw the video, you noticed that the enemy of my game, fell after giving me an attack. You could tell me that this would be a creation point problem (origin) but no. Because after changing the collision box this stopped happening so I did this with all my other objects (enemies).

By the way, that platform the enemy was on is a Jumpthru!

It’s hard to be sure that those are directly linked.
Maybe changing the hitbox had an effect on another issue, but it’s hard to tell.

If you happen to run into it once again, it would be great to have a reproducible example to look into it.

1 Like