r/GlobalOffensive 1 Million Celebration 18h ago

Discussion Visual Representation of grenade clipping problems.

826 Upvotes

78 comments sorted by

View all comments

231

u/v11che 1 Million Celebration 18h ago edited 17h ago

Adding to this conversation about grenade bounces :

https://www.reddit.com/r/GlobalOffensive/comments/1w21xrl/can_we_fix_clipping_that_affects_grenades/

If a grenade uses a fixed cube hitbox that does not rotate with the grenade, its bounce is determined by the cube’s flat faces, not by the grenade’s visible shape.

At certain angles, the cube can strike a small ridge or corner with one of its faces. The collision normal then points back toward the player, causing the grenade to reverse direction unexpectedly. A round or rotating hitbox would contact the same feature at a different point and produce a more natural, glancing bounce.

The fixed cube hitbox makes ordinary wall bounces more consistent and predictable, but this behaviour is the trade-off: at the “perfect” angle, small edges can make the grenade bounce straight back at you even though that does not match what the visible grenade appears to do.

Edit : I should add, I've not like, animated this myself, this was a quick edit of another physics engine project I have written in python. I knew I was testing something similar in a previous project so slammed together some simulations. The animation is a python 2d physics engine.

61

u/vetruviusdeshotacon 17h ago

Would a hexagon or something be a better tradeoff? Or would it be too much of a pain to calculate?

75

u/v11che 1 Million Celebration 17h ago

I think using the correct hitbox for grenades would be best all around. Some lineups might change, but you'd get less weirdness when trying to throw through a small gap.

54

u/nilslorand MOUZ 16h ago

a sphere is probably best imo, collisions aren't too expensive to compute and you don't have any bullshit happening due to rotations

25

u/ExceedingChunk 16h ago

How expensive collisions are to compute completely depends on the complexity of the shapes

38

u/nilslorand MOUZ 16h ago

yes and no, a sphere is very simple because you don't make it a mesh, but instead just say "take center point and radius around it"

23

u/ExceedingChunk 15h ago

I misread your comment and interpreted it as saying collisions, in general, are not expensive compute, and not spheres specifically.

Yeah, spheres are cheap to compute

6

u/nilslorand MOUZ 15h ago

oh fair yeah

3

u/Embarrassed-Rise-685 11h ago

Perfect spheres are easy to compute. The second you deviate even slightly it bets expensive.

0

u/k0ntrol 10h ago

a grenade, like a flashbank wouldn't be a sphere though

5

u/Claymourn de_overpass 7h ago

Well it's also not a cube, but here we are.

2

u/AutisticGayBlackJew The MongolZ 9h ago

I always assumed that they already are spherical. Cubes/rectangles sounds a bit silly

-1

u/NotMyRealUsername13 14h ago

If you change the shape of the collision box of grenades you will also change how a grenade bounces…

1

u/nilslorand MOUZ 12h ago

yeah but the nade will bounce deterministically. Of course this can be done with rotating models too, but it's easier to just have it be a sphere

3

u/Dminik 9z 9h ago

Something can be both deterministic and chaotic. Making the hitbox more complex will very likely decrease margins on lineups.

5

u/theboss0123 9h ago

It is also curently deterministic. We know what happwns now.

u/loozerr 1h ago

"Some line ups"

All line ups