UdonCombatSystem
LATEST VERSIONS REQUIRE THE LATEST UDONSHARP VERSION THAT CAN ONLY BE OBTAINED THROUGH VRCHAT CREATOR COMPANION
A simple combat system designed for VRchat
Relies on https://github.com/Toly65/Udon-Stow-System
Setup
Combat System Setup
- Drag the combat system prefab into the scene
- Find the playerHealthManager gameobject
- Assign a spawn point into the spawn points array
Gun setup
- Use one of the gun prefabs as a template
- Place anything visual on the rotation point
- Have the script as the first parent of the pickup
- Configure variables as desired
For projectile weapons
- Perform the above steps in Gun Setup
- Have a gameobject with a collider and a bullet script
- Assign variables there
- Assign this bullet prefab to the gun
- Untick raycast damage
- Ensure that the projectile is slow as unity's collision will not play nice at actual bullet speeds
Projectile weapons should contain any scripted things they are firing out within themselves in a disabled form in order to clone them for use in game, this allows them to be preconfigured. An example of something you would want to clone would be a physical bullet
Hitboxes are managed locally and are pooled in the combat system prefab, any changes to a hitbox will have to be duplicated to refill the pool
Features
- Favour the shooter combat
- Bone tracked hitboxes
- Explosions that push physics objects and players
- A flexible modular system if you wish to expand the system with your own features
For further support and possible updates join this discord: https://discord.gg/cvF8JEhrq7