Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Damage rework - Hit position & Direction #317

Merged
merged 6 commits into from
Dec 9, 2024

Conversation

niefia
Copy link
Collaborator

@niefia niefia commented Oct 16, 2024

  • Reworked the damage system to include Hit position & direction
  • Added options to instantiate scenes at either global or local hit position
  • Added option to apply force to Rigidbodies on hits
  • Added option to spawn decal on any hitscan collision

WIP - Still need to sort melee weapons hit position

Reworked the damage system to include Hit position & direction
Added options to instantiate scenes at either global or local hit position
Added option to apply force to Rigidbodies on hits
Added option to spawn decal on any hitscan collision

WIP - Still need to sort melee weapons position
Removed direct player references for better multiplayer support in future

Fixed button damage interaction

Also fixed a typo in the readme
Added option of Hitbox-Collider melee collision, seems from my testing to be more accurate since it uses the actual hitbox, but less reliable so have it as an option.

Added knockback to the NPC so they can respond to damage
@Phazorknight
Copy link
Owner

Hey, wanted to check in if this is still gonna be updated or if it's ready for review?

@niefia
Copy link
Collaborator Author

niefia commented Nov 4, 2024

It's mostly done, just want to rework bullet impact decals before merge.

Haven't been able to work on it much lately but will try and get that done today

Added Bullet decal pool , full credit to Majikayo Games' SimpleFPSController for that code and the decal image.
Refactored laser rifle to separate collision decal from collision scene

Bullet decals seem fairly buggy in the lab, but work fine in the lobby map, may be a collisions issue with lab meshes
Added collision settings
Removed testing meshes from bullet decal
@Phazorknight
Copy link
Owner

Hey, just gave this a bit of a test today. Overall it's working great! The bullet decal seems to work especially well.
I haven't looked into the code much but I noticed the impact particles seem to not spawn if the impact is close to the player. Let me know if thats by design.

Copy link
Owner

@Phazorknight Phazorknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to merge in some of these features so I'm gonna approve this.

@niefia thanks so much for your work on this! If you continue to tweak this, please make a new PR from main!

@Phazorknight Phazorknight merged commit 2b0c891 into Phazorknight:main Dec 9, 2024
1 check passed
Phazorknight added a commit that referenced this pull request Dec 9, 2024
Fixed issues that came with mergin in PR #317 due to just being a bit behind main.

Updated more scripts to use Cogito debug logging.

Minor cleanup.
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.

2 participants