Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Bauul

Fixing a Revenant's hitbox height without impacting geometry?

Recommended Posts

We all know how the Revenant's sprite is far taller than its physical hitbox: in some frames up to 70% taller.  On any freelook port without autoaim, this makes shooting at them a frustrating and inconsistent experience as higher shots will pass straight through. 

 

8Yb1wHL.png

Credit to Enjay for image, from his excellent Offsets Tutorial

 

A simple solution would be to simply increase their height, but this would break any maps that expect Revs to be able to pass through low corridors.

 

So I was wondering: can anyone think of any method that could be used to set a Rev's hitbox to the correct 92 units when interacting with hitscans and projectiles, but leave it at 56 units high when interacting with geometry?  

I suspect no, not without adding the functionality to the engine at the source level, but if anyone can think of any ideas for how this could be implemented at something like an ACS or Decorate level I'd be extremely interested to hear!

Share this post


Link to post

Hmm, now I'm curious. Both Eternity and ZDoom support a separate bounding box height solely for collision purposes. The main reason both ports implemented this is to allow for both z-clipping of things to be implemented while letting projectiles travel above the original tiny bounding boxes of decorations. The bounding box for other things had to be made taller since otherwise you could simply step on top of all decorations.

 

Due to this being the primary use, I always long assumed that missile height had to be lower than the normal actor's height, but thinking about it, there's literally nothing that says this is the case that I'm aware of at least. So you might be able to simply increase the height used for projectiles to the right value, and everything else should be fine.

Share this post


Link to post

Ah, I see what you mean: the ProjectilePassHeight actor value.  I'll see what I can do with it, thanks!

Share this post


Link to post

I'm assuming the same can't be done for the arachnotron and spiderdemon, but inversely? Both of those monsters have the exact opposite problem: their hitboxes are an extra third or so wider than their sprites.

Share this post


Link to post

Scale only affects the sprite, it does not affect the bounding box. so I guess you could scale the rev to fit in its given bounding box, but that would be kind of dumb looking.

 

Peeking at the code a little further ProjectilePassHeight might work in ZD at least, since projectiles use different collision detection. It doesn't need to be smaller than the normal bounding box. I'll double check the EE side of stuff but I have no reason to suspect its that much different.

Share this post


Link to post

You could add a second actor with a hitbox that covers the missing area and moves with the revenant, or maybe spawns for a moment at every sprite movement to simulate movement. This second actor would still allow the revenant to pass through low sectors, but the actor's hitbox would block those high shots and transfer the damage it takes to the revenant.

Share this post


Link to post
10 hours ago, Ichor said:

You could add a second actor with a hitbox that covers the missing area and moves with the revenant, or maybe spawns for a moment at every sprite movement to simulate movement. This second actor would still allow the revenant to pass through low sectors, but the actor's hitbox would block those high shots and transfer the damage it takes to the revenant.

That sounds really inconvenient and messy, if I'm being honest.

 

I suppose it might work, but I'm sure a cleaner solution for this problem exists. InsanityBringer's suggestion seems much more straightforward to me.

Share this post


Link to post

I got around to testing ProjectilePassHeight tonight as a solution.  The good news is it works for Projectiles.  The bad news is it doesn't work for Hitscan weapons.  

 

So it's the right idea, but I suspect it'd need some source code editing to expand to hitscan weapons.  I had a look in the ZDoom source code and the ProjectilePassHeight code seems to be part of the Thing interaction code, so not sure how transferable it could be.  

 

Share this post


Link to post

I added yScale 0.75 to the revenant to fix this issue.  It looks goofy at first but you get used to it and it has a beneficial side effect: the rockets actually come out near the shoulders instead of the middle of his chest now.

 

And as far as the Mastermind is concerned you can easily drop her radius from 100 to 50 if you want the brain to be the target.  Legs of course can clip through walls afterwards.  

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×