I don't code, so I have a question...

Proelium·12/30/2015, 6:57:06 AM·3 votes·463 views

Is it like super duper hard to make an ability's hitbox line up with it's animation?

9 Comments

Sire Hippington12/30/2015, 4:25:55 PM4 votes

there are some problems: The angle. LOl is played in a isometric view, so the raw visuals can sometimes be a bit deciving, especially for high above the ground projectiles, as Z-axis only exists in visuals, while gameplay happens on x+y only.

Wether a skill hits or not depends not onlly on the hitbox of the skill, but also on the hitbox of the target. So if you have the hitbox-outlines shown on the ground like Illaoi's Q does, thos lines ARE correct. Just that you get hit as soon as your champions hitbox touches that of her Q, so what you precive as a fail of her Qs hitbox is actually more your champions hitbox not beeing as expected.

Another problem is that complex forms are horrible to code for hitboxes, so one will resort to easier geometric forms, like circles or rectangles, which usually means the hit box doesn't align perfectly with the visuals. For example, a units hitbox usually is a circle, but most humanids hardily have the shape of a perfect circle(besides gragas maybe) if seen top down. The top-down silhouette is what theoretically is projected on to the x-y plain that is used for gameplay and could get used for a complex hitbox, but doing so would be **far **more effort. Aditionally, the shape would have to change duering every animation to match the top-dpwn siluet at any point. This would be a huge effort that stands in no relation to the little gains. Additionally, it would hurt the performance a lot, you would need way better PCs to play lol with complex hitboxes, so a huge part of the comunity wouldn't be able to play it anyome with their PCs. And the problem with isometric camera would stay, though that could maybe be solved by useing the isometric silhouette rather than top down, but it would require even bigger adjustments duering animations and a more comples shape...

Tl;DR: The skillshots have proper hitboxes, the shown hit box of some skills like Illaios Q are infact correct(most likely). it's jsut precived false cause of different things like your own hitbox and the isometric camera.

TehNACHO12/30/2015, 7:16:01 AM3 votes

Yes, in fact.

The problem is less about coding and more reliant on the art team btw, but the problem is the slight tilt that League's camera has, and how the terrain pushes the champion model up and down slightly at random parts at the map (most obvious points are river entrances). You see, because of that tilt, things that don't directly touch the ground look like their shifted a little higher than they actually are, and because of the fluctuating terrain, it can pose weird situations where the ground digs into larger projectiles, or the smaller ones look off angle. To counteract this, many hit boxes are slightly lower(?) than where the animated projectile is to compensate for camera tilt and ground manipulation. If you were here during the transition between S4 and S5, you'd probably remember how basically half the projectile in the game were suddenly fucking hard to judge; this is because they modified the camera angle when they introduced the new map. While they fixed most of it with the new map's higher camera angle, the problem obviously still exists.

Valderis Vandala12/30/2015, 7:16:05 AM1 votes

No, its super easy.

shyv12/30/2015, 7:30:30 AM1 votes

Lol this seems like a passive aggressive way of saying riot broke some shit

but i would think it would be easy? i've only made sorta basic stuff bc my knowledge of programming is classes i took in high school but like.. if the pixel for this sprite lines up with this thing then this happens? idk its 3 am

The Sword Saint12/30/2015, 4:54:12 PM1 votes

It's a challenge because of the camera angle, the fact that champions also have a hitbox, and that champion hitboxes are different for each one which makes it feel bulshit when you avoid the skillshot with your champion model but your champ's hitbox is still snagged.

A solution could be to put little circle under champions to show their hitbox at all times, but it could be argued that this is a nuanced point of mastery in the game.