Type the following sequence in the console (can copy/paste the warp command)
map map21
god
give all
warp 2584 4127 128
Without moving from that spot (between the yellow bars) try killing all monsters in sight using only the rocket launcher and plasma canon. Notice that the projectiles are so large they hit the yellow bars from monsters on the edge. I don't know how many times I killed myself due to thinking I had a clear shot, but forgot how large the projectile bounding box was.
Projectile size
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Projectile size
Yup.
Rockets have a "radius" of 11 doom units, which means they're roughly a 2'x2' square. This is necessary because the rocket's speed is 20, which means it advances 20 doom units every gametic - and therefore only checks for collisions around its hitbox every 20 units.
If you made the projectile's radius less than half of its speed, it would routinely clip through walls and possibly even monsters in unwanted ways.
Nowadays you can get around it using a FastProjectile, but there are a few drawbacks to that too. (e.g., no gravity unless you program it in yourself)
Rockets have a "radius" of 11 doom units, which means they're roughly a 2'x2' square. This is necessary because the rocket's speed is 20, which means it advances 20 doom units every gametic - and therefore only checks for collisions around its hitbox every 20 units.
If you made the projectile's radius less than half of its speed, it would routinely clip through walls and possibly even monsters in unwanted ways.
Nowadays you can get around it using a FastProjectile, but there are a few drawbacks to that too. (e.g., no gravity unless you program it in yourself)
-
- Posts: 134
- Joined: Mon Aug 14, 2017 3:04 pm
Re: Projectile size
I suppose tracing the entire route was too computationally involved for computers of the early 1990s. So even if the rocket traveled at the speed of light any obstruction along the way would still be caught. Instead it just does a radius check every gametic.
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Projectile size
Exactly.
Nowadays with ZScript, in addition to the way FastProjectile does it, one alternative is to use a LineAttack for each corner plus the middle and check the resulting distances. It's a bit computationally expensive with that many steps in the virtual machine, but it can be better than a FastProjectile (which just does multiple checks every gametic, as many as needed to fill all the spaces) at very high speeds at great distances.
Personally, I just get lazy and do only one hitscan check.
Nowadays with ZScript, in addition to the way FastProjectile does it, one alternative is to use a LineAttack for each corner plus the middle and check the resulting distances. It's a bit computationally expensive with that many steps in the virtual machine, but it can be better than a FastProjectile (which just does multiple checks every gametic, as many as needed to fill all the spaces) at very high speeds at great distances.
Personally, I just get lazy and do only one hitscan check.
Re: Projectile size
I just move to the left or right of the other side of the yellow bars. The projectiles can fit there.
Re: Projectile size
@matt
That reminds me, I've thought about shooting one center and 4 radial hitscans in the movement direction of a projectile (or just the player) to get the angles of whatever wall it's facing. Ever tried that? Should allow for complex bouncing behavior, impact puffs with angled momentum and bouncing railgun shots if it works.
That reminds me, I've thought about shooting one center and 4 radial hitscans in the movement direction of a projectile (or just the player) to get the angles of whatever wall it's facing. Ever tried that? Should allow for complex bouncing behavior, impact puffs with angled momentum and bouncing railgun shots if it works.
-
- Posts: 134
- Joined: Mon Aug 14, 2017 3:04 pm
Re: Projectile size
Ya since the projectile doesn't strafe, just tracing the 4 corners in the direction of travel should do, otherwise all 8 corners would be needed. So fast projectile does multiple box or sphere collision checks each gametic, I wonder how that compares to trace checks computationally wise (might depend on the speed/size of the projectile.)
@Nevander
Ya, but the constraint of staying in that one spot was just to demonstrate the projectile size.
Rockets ricocheting of walls hit and obtuse angles might be interesting. Maybe bouncing plasma off mirrored images.
@Nevander
Ya, but the constraint of staying in that one spot was just to demonstrate the projectile size.
Rockets ricocheting of walls hit and obtuse angles might be interesting. Maybe bouncing plasma off mirrored images.
- Matt
- Posts: 9696
- Joined: Sun Jan 04, 2004 5:37 pm
- Preferred Pronouns: They/Them
- Operating System Version (Optional): Debian Bullseye
- Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
- Contact:
Re: Projectile size
@kodi
Never had the bother myself to take it anywhere with projectiles, though the current weapon collision system in HD comes pretty close to the sort of thing you're desribing - by shooting four hitscans for top, bottom, left and right I can check which one is shortest and prevent the player from turning in that direction.
Never had the bother myself to take it anywhere with projectiles, though the current weapon collision system in HD comes pretty close to the sort of thing you're desribing - by shooting four hitscans for top, bottom, left and right I can check which one is shortest and prevent the player from turning in that direction.