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

Dynamic Footstep System #58

Merged
merged 9 commits into from
Feb 12, 2024
Merged

Dynamic Footstep System #58

merged 9 commits into from
Feb 12, 2024

Conversation

ac-arcana
Copy link
Collaborator

Here is my Dynamic Footstep System. It works well in my tests. There is a demo scene included. All of the resources, assets, and scripts are contained in the DynamicFootstepSystem folder.
I did make a small change to the player script to support the system, but the system is optional and if it is not specified the player script will work normally and play generic footstep sounds.

Added an optional dynamic footstep system which can play different foot step effects based on the material below the player or with a component added to the collider.
Unassigned Footstep Surfaces will still play a generic footstep sound.
@Phazorknight
Copy link
Owner

This works great, that's exactly what I imagined.

Only a small note, then I think we can merge this into main:

  • The added player.tscn is confusing. As your system already has a fallback sound, I see no reason keeping the old one around. Would you mind applying the new FootstepPlayer and it's script to the main player.tscn ? Feel free to include the needed changes from the player.gd script, I took a look and they seem very minor.

  • In your test scene the StaminaComponent or at least the StaminaHUD doesn't seem to work? It still works in the COGITO_01_Demo.tscn so maybe some hookup got disconnected somehow.

@ac-arcana
Copy link
Collaborator Author

Yes, I can get rid of the added player scene and modify the main player scene. I didn't want to change your base player without express approval.
I'm not sure why the stamina component isn't working, I'll try to figure that out. I did the basic structure of including the player, player_HUD, and pause menu and linking them together.... I'll post once I've got some more commits for this.

Changes were placed directly onto the main player scene.
The player script  had some unnecessary lines removed as there is no need to fallback on the old system since this new system is integrated.
@ac-arcana
Copy link
Collaborator Author

Okay so the changes are pushed to the main player scene now. I removed some extra lines from player.gd because there is no need to fall back onto the old system since it will be integrated now.
The stamina component wasn't working because I didn't check "Use Stamina Component" on the Player Hud.
The stamina was still working on the player itself by default, but the HUD doesn't get updated without that checked.

@ac-arcana
Copy link
Collaborator Author

I didn't properly support static meshes and rigidbodies. Also didn't support all of the CSG shapes. I'm working on these now.

@ac-arcana
Copy link
Collaborator Author

Okay, I think its ready for review again

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.

Amazing work!

@Phazorknight Phazorknight merged commit f8d4f01 into Phazorknight:main Feb 12, 2024
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