I don't have a detailed vision on what I want for the combat system, but I have some ideas to get started.
I want both melee and ranged attacks
I want a pickup system for weapons and power-ups/modifiers
I want a fully diegetic experience, so no HUDs and things like that
Particular Reality is meant to be designed around the limitations of current VR systems.
In the first four days, we implemented a locomotion system that goes around the limitation of not having, in reality, a huge (potentially endless!) room to play VR games.
The other big limit of VR is the lack of haptic feedback: you can pick-up a gun, but you won't feel its weight - you can punch something, but your hand won't feel the impact (unless you did your guardian setup wrong and you ended up actually punching something in your room... I once almost broke my hand playing EchoVR).
The bold choice of Particular Reality, then, is NOT having solid objects in the game world, except for the platforms on which you stand upon, which are mapped to your room floor, which we know is actually there.
Everything else will be made of wobbly particles (you might have guessed by the title of the game!), and will follow the laws of physics that we decide (forget dropping something on the floor for a misrecognized gesture and having to pick it up).
So how does this apply to combat?
Well, one idea I have is considering kinetic energy to decide what happens when two elements collide.
If a fast moving element hits a slow moving element, the fast moving "wins" the interaction. And maybe, but we'll think about that later, "steals" its particles.
As first step, it sounds reasonable to build a system to detect hits we can perform hands-free.
As you might have realized by now, I'm a big fan of building small debug visualizations to try out features.
In this case, I decided to start adding a sphere with a trigger collider, and developing a spawnable "impact wave".
When a collision with the sphere is detected, an impact wave is spawned (positioned and rotated according to the impact).
After simulating impacts with a cube dragged with the mouse in the editor, I added to the hands some sphere colliders that could do the same job.
This is what I got:
The positioning of the impact wave is not perfect (takes the position of the colliding hand and not of the exact hit point), but other than that it looks fine.
Let's fix that and also add the option to pick-up a melee weapon.
I quickly put together a "power-up pickup" spot where something can float to be picked up, and a pick-up mechanism that can be activated by a gesture when you are in proximity of the spot.
Momentarily, I re-purposed the pinch I previously used for the portal activation, and I only supported the right hand for the weapon pick-up.
The small sphere on the ground is yet another debug indicator that tells when we are close enough to fetch the power-up performing the pick-up gesture. Doing the gesture again releases the weapon, which goes back to the pick-up spot.
Of course there might be many variations and uses of this kind of thing. Weapons that disappear after some time or a certain number of uses, things that respawn periodically, or unique items that don't respawn.
But for today, a stick to bash the purple sphere is good enough.
What's next?
I think it's time to work a bit on the gesture detection, maybe using the Meta Interaction SDK.
This way, I'll be able to assign different gestures and hand poses to different actions.
Moreover, the weapon pick-up mechanism must be generalized to arbitrary weapons/power-ups, and must be accessible by both hands.
I also have something in mind for a two-handed interaction which might be pretty cool. But not sure I'll get to it tomorrow.