VedalAI / neuro-amongus

Among Us Plugin for Neuro-sama
GNU General Public License v3.0
540 stars 49 forks source link

Fix raycasts in vision not working when there is an object in the way #5

Closed Vedal987 closed 1 year ago

Vedal987 commented 1 year ago

I think the main example of this is the admin table on "The Skeld"

Alexejhero commented 1 year ago

If sending raycasts from the player, they should ignore the layers that are also ignored by shadows. Ideally the raycasts should be sent down from the camera, to multiple points on the player, but I'm not sure how you could detect if it hit a shadow or not, since shadows are done by having a big object follow the player around that renders on top of everything, while a shader controls which pixels should be a shadow and which should be transparent. I'm not sure how you could detect that transparency.

JohnyDaison commented 1 year ago

Looking at the code, it seems like Vedal already ignores the Ship and Shadow layers, one would hope that just adding the right layers to that list should solve it, unless the walls and the admin table are on the same layer, that would make things very complicated. But since Vedal has the game's source code, extracting the logic from the shader could also be a way to do it.

Alexejhero commented 1 year ago

But since Vedal has the game's source code, extracting the logic from the shader could also be way to do it.

The game's source code is publicly available to any Among Us modders.

Additionally, shaders are compiled so you cannot extract their source code from the built version of the game.

The problem here is that the vision is using movement/anything-between colliders instead of shadow colliders to check if something is visible.

On Wed, Mar 22, 2023, 18:13 Johny Daison @.***> wrote:

Looking at the code, it seems like Vedal already ignores the Ship and Shadow layers, one would hope that just adding the right layers to that list should solve it, unless the walls and the admin table are on the same layer, that would make things very complicated. But since Vedal has the game's source code, extracting the logic from the shader could also be way to do it.

— Reply to this email directly, view it on GitHub https://github.com/VedalAI/neuro-amongus/issues/5#issuecomment-1479959626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHV6XKFEULQ47QHOTL3BC6LW5MXM7ANCNFSM6AAAAAAWDGOJQQ . You are receiving this because you commented.Message ID: @.***>

oleg20111511 commented 1 year ago

Fixed in PR #11