Closed ac-arcana closed 6 months ago
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.
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.
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.
I didn't properly support static meshes and rigidbodies. Also didn't support all of the CSG shapes. I'm working on these now.
Okay, I think its ready for review again
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.