Rocket launcher issues and possible solutions

The problem

If you’ve ever done some raiding with a rocket launcher you might have destroyed or damaged the placables behind the wall you were shooting at without knowing (it is hard to hear destruction noises with an explosion going off, nor can you really tell the HP of the buildables that are not owned by you).

^ This is a locker behind a wall after being shot by two rockets.

^ This is a locker behind a wall after the outside wall is hit by a demolition charge

So why does this happen?

I’m not 100% certain, I think it’s a combination of the rocket being a dynamic projectile with its collider being fairly centered and basically slipping inside of the box colliders of the walls and thus being able to damage everything “behind” the wall (as it’s exploding inside of the wall, the explosion is effectively ignoring the wall itself as a barrier).

image

image

^ Colliders highlighted in green and red respectively.

image

^ Artistic depiction of the problem, with the rocket and its center depicted in green, occuring explosion in yellow and sad damaged locker in gray on the right.

Why does this matter?

There’s two weapons in vanilla that utilise the projectile system - aforementioned rocket launcher but also the tank cannon. They are obviously much less of actual weapons than they are just raiding tools, with raiding being more or less the endgame, it’s odd to accept this inconsistent behavior.

I remember when creating Arid I ran into this exact issue although with my own custom rocket launcher, I chalked it up to explosives as a whole doing damage through walls, which is not the case, it is exclusive to the projectile weapons.

This obviously extends to modding as a whole, it’s a confusing aspect of these weapons.

What can be done about this (in vanilla)?

The collider of the rocket can be adjusted, from my limited testing, simply moving the collider forward seems to alleviate the issue. In theory this should should move the explosion backwards, avoiding the explosion happening inside of the wall and thus applying the damage properly.

^The center is behind the collider, meaning that once the projectile has hit a wall, the center (and thus the explosion) will be outside the wall.

^ Video showcasing the ‘Proposed’ collider.

This is sort of a band-aid fix but at the same time it comes with no downsides. As far as I can tell this fixes the issue entirely for the vanilla rocket launcher (which has a fairly slow moving projectile), similar adjustment could probably be applied to the tank cannon, whose projectile very much resembles the rocket one. I think by all means this would be a welcome change which would also be very easy to implement.

There’s also the rigidbody settings:

image

I have not done comprehensive enough testing but the ‘Continuous’ settings seemed to improve the explosion behavior somewhat - Unity Docs suggests this as a fix to “tunneling” but at the same time I won’t claim to know because I don’t.

Anyone who has dabbled into creating custom projectile weapons and tried increasing their velocities will know how unreliable they can get, the solution seems to be increasing the projectile size but that also comes at downside of projectiles sometimes exploding when clipping sides of objects or when visually not touching anything.

Perhaps there is also some kind of a fix that could be done on the game side to alleviate the aforementioned issues.

3 Likes

If tunneling is the issue here perhaps utilizing swept bounds between the before/after rocket positions to work out a collision point could be a potential solution (e.g. spherecast between the two positions → get point of contact → boom).

2 Likes

There could even be a new penetration rocket that deals less damage to walls and more damage to structure and barricades behind the
Wall