Skip to content

Fix projectiles stuck to geometry#1758

Merged
Rainyan merged 8 commits intoNeotokyoRebuild:masterfrom
Rainyan:bug/projectile-stuck
Mar 1, 2026
Merged

Fix projectiles stuck to geometry#1758
Rainyan merged 8 commits intoNeotokyoRebuild:masterfrom
Rainyan:bug/projectile-stuck

Conversation

@Rainyan
Copy link
Copy Markdown
Member

@Rainyan Rainyan commented Mar 1, 2026

Description

Projectiles are created in the world 16 units (player hull horizontal radius) in front of the camera. This resulted in the bug where if close to a wall, the projectile could be created inside it, because it didn't account for the collider size of the projectile itself. This problem was present for all of our projectiles (nades, smokes, dets).

This PR adds a trace hull check to make sure the projectile fits, and when not, move the spawn position closer to the camera.

There's also a new CNEOBaseProjectile : public CNEOBaseCombatWeapon class to avoid projectile-related code repetition. Currently I've only moved parts related to this PR, but there's more that could be refactored later.

Simple way to test this is throwing nades while touching and looking directly at a wall.

Toolchain

  • Windows MSVC VS2022

Linked Issues

Rainyan added 8 commits March 1, 2026 12:15
Add an intermediate class for combining NEO projectile stuff into one
implementation, since we are repeating the code a lot.

For now, just refactoring the parts relevant to this PR.
@Rainyan Rainyan requested a review from a team March 1, 2026 11:44
@AdamTadeusz AdamTadeusz requested a review from a team March 1, 2026 16:16
@Rainyan Rainyan merged commit 80e1ba9 into NeotokyoRebuild:master Mar 1, 2026
7 checks passed
@Rainyan Rainyan deleted the bug/projectile-stuck branch March 1, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Projectiles can be clipped into walls

3 participants