Englisch Curtailed explosion

2 Antworten
Gehe zu Seite
Zum Anfang Vorherige 1 Nächste Zum Anfang
28.02.23 20:00:15
Hoch
mozilla1
User
Offline Off
Can someone explain to me how the curtailed explosion option in cs2d works? what is the exact algorithm to calculate how it negates damage behind wall?

My guess is that you cast a ray in all directions with the explosion center as origin and check any walls in the path, however i'm not sure
28.02.23 21:43:39
Hoch
DC
Admin
Offline Off
Yes, it basically works like that. It just doesn't shoot rays in all directions. Instead it does this:

• All objects (players, hostages, breakable entities, dynamic objects) within the explosion radius are detected (with a simple radius distance check)

• if curtailed explosion is on, a single ray is shot from the center of the explosion to the center of the object (per object). Only if the ray isn't blocked the game applies the damage.

• if curtailed explosion is off, the game just applies damage and skips the ray check.

And it really shoots rays just from center to center? Isn't that quite imprecise? Yes it does and yes it is - but it's good enough. That's because targets are mostly smaller than walls and when a ray doesn't hit it means - in most cases - that like 50%+ of the target are covered behind a wall or something.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
28.02.23 23:21:20
Hoch
mozilla1
User
Offline Off
oh i see, thank you for the reply
Zum Anfang Vorherige 1 Nächste Zum Anfang