More accurate bounceonactors?

Moderator: GZDoom Developers

Post Reply
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

More accurate bounceonactors?

Post by Cutmanmike »

The BOUNCEONACTORS flag works fine, but projectiles aren't bouncing as I had hoped them to. For argument's sake let's say I have a bouncing projectile weapon and a solid, shootable DECORATE object in the room. There's also a monster in the room that I cannot see from where I'm standing.

Code: Select all

---------------
|             |
|         o   |     p = Player
|p            |     o = Object
----          |     m = Monster
   |m         |
   ----------
What I was hoping for was if you shot at the object from the correct angle, you could reflect to shot at the monster around the corner. What actually happens though is a bit inconvenient. You would think that firing at the object at one angle would bounce it in the same direction if you fired at it again at the exact same angle, but this is not the case. Standing perfectly still and firing seems to just bounce the projectile off in a random direction.

I was looking at the flags and I saw that there were REFLECTIVE and DEFLECT flags. I tried giving the object these flags and shot with with a non-bouncing projectile and they still reflect off the object with a random angle. I don't know if this is intentional or not because the wiki description for these is a bit vauge.

Making DEFLECT not random, "fixing" BOUNCEONACTORS or making a new flag entirely would be fine if this feature could be added.
User avatar
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

Re: More accurate bounceonactors?

Post by Snarboo »

I think it bounces off actors randomly because of inaccuracies with actor bounding boxes. Obviously a projectile can tell whether it has hit a bounding box or not, but I don't think it takes into account things such as the angle at which it hits them. Could be wrong, though.
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: More accurate bounceonactors?

Post by Gez »

Yup. Keeping in mind that the bounding boxes are square and do not rotate, more accurate bounces would always be by mirroring the angle either along the X or the Y axis. A p->o->m trajectory on your example is therefore impossible...
User avatar
Amuscaria
Posts: 6634
Joined: Mon Jul 26, 2004 12:59 pm
Location: Growing from mycelium near you.

Re: More accurate bounceonactors?

Post by Amuscaria »

Gez wrote:Yup. Keeping in mind that the bounding boxes are square and do not rotate, more accurate bounces would always be by mirroring the angle either along the X or the Y axis. A p->o->m trajectory on your example is therefore impossible...
I thought the Bounding boxes were Octagons? o_o
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: More accurate bounceonactors?

Post by Project Shadowcat »

Nope. Bounding boxes are just that: boxes.
User avatar
DoomRater
Posts: 8270
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: More accurate bounceonactors?

Post by DoomRater »

It is at these times I wish the bounding mechanism was circles...
The_Funktasm
Posts: 612
Joined: Tue Mar 17, 2009 5:12 am
Location: done making ZDF free sprites

Re: More accurate bounceonactors?

Post by The_Funktasm »

Project Dark Fox wrote:Nope. Bounding boxes are just that: boxes.
At least they aren't triangles.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Re: More accurate bounceonactors?

Post by Project Shadowcat »

The_Funktasm wrote:
Project Dark Fox wrote:Nope. Bounding boxes are just that: boxes.
At least they aren't triangles.
Ugh. Yeah. I couldn't imagine how bad the collision detection would be.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49238
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: More accurate bounceonactors?

Post by Graf Zahl »

Gez wrote:A p->o->m trajectory on your example is therefore impossible...

Correct. And unfortunately this makes the entire suggestion impossible to handle.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”