|
Post by Clinkzbone on Jun 2, 2020 14:26:35 GMT
The bug occurred during the mission to raise reputation with the police. I was driving along the highway at 250+, and crashed into the side of the highway, specifically the corner where a ring road started. I then somehow passed the border and got stuck outside the highway on the grass section.
|
|
|
Post by mase on Jun 2, 2020 16:32:26 GMT
I absolutely hate this bug!
The problem is that there's a small "collision dummy" right at the center of the fork. When you go very fast, the distance you travel per game logic cycle is so big that you simply overshoot it and end up in the grass. I was secretly hoping that no one would encounter this issue, but here we are hahaha. Anyway, I'll probably extend the collision box a little, which will hopefully fix the problem for good.
|
|
|
Post by Clinkzbone on Jun 3, 2020 16:28:36 GMT
Dunno if it's feasible here, but when I faced this issue when messing around in Gamemaker I solved it by projecting a line in front of the character (in this case, the car), and if the line would intersect with a collision box on the next tick, I set the position of the character to be beside the collision box and reduced speed to 0. Expanding the collision box is probably a much easier way to solve the problem though
|
|
|
Post by mase on Jun 4, 2020 9:20:31 GMT
The way collision detection works at the moment is that objects register themselves to a grid. If the object count of a cell in that grid exceeds 1, that cell goes on a "potential collisions" queue and is processed somewhere towards the end of the logic cycle. To implement a look-ahead feature, I would have to register objects to additional cells, depending on their movement vector. If this problem is frequently occurring it might warrant such an addition, but I think at the moment (or at least from my experience so far), it's a rather rare problem and not worth the computational overhead. I like your thinking though!
|
|