Testing Photon 2 Package in Unity Scene
For my experience to work in Unity i needed to have a way to have online multiplayer or Co-op in my project and this can be achieved through a package called ‘Photon 2’. I installed the package and using an online tutorial was able to set up and initialise the software in my project and using the messages could see that i was able to achieve a full connection.
However one problem with my current setup is that i cant truly test if this is working properly until i have another computer and headset to test this experience fully and so i will need to wait for a while until i have the set up to achieve which will most likely be after the summer break when i have access to the campus computers and facilities again.
Finding a Character Model
In my previous VR projects i have not needed to have a character model for my player because there was no one else to see them and so i would only need hands for the experience. I started to look online and at first i thought should i just get a blank human character or dummy model at the moment to achieve for for the time being. However i ened up finding a robot model that could be fully rigged which i found would work really well and i started to think further about how this could maybe be used in the final experience and be tied to the narrative of the story.
Rigging the Character Model
Once i downloaded the robot character model (which my friend named grasshopper and mantis which i liked the idea of) I added him into my Unity scene and began at looking how to add this to the XR rig. Using some online tutorials i found that using some skeletons from Mixamo i could rig the model so that it would fully work and move using a humanoid structure which can hopefully be developed later into the XR rig as seen from the images below.
Testing the character Model in VR
I then followed the tutorials further and with some trial and error i was able to rig the model to the XR rig and had the arms and head constraints all linked which worked well overall. It did require a few tweaks to make sure the hands and head appeared in the right places as the players real life positions but in the end it was working successfully as you can see from the images below.
Adding Legs and adding a walking Animation
For the tutorial we originall removed the legs because we of course dont have a VR setup that can also track legs so at the moment the torso was kind of floating around like a Rayman character which would have been fine but i knew it would be better if the players could see a full body in the reflections.
So once again following the tutorial we added back in the legs and using a walking animation from mixamo, I was able to download that animtion and attach it to the legs which meant that as the player moved around the scene using the controller joystick, the legs would walk as well which looks great for the other player in the scene as you can see from the images below.
Allowing the Model to Crouch in VR
One last element of the tutorial which i really liked was how the body could morph and changed depending on the players movements which also included how it would look if they crouched. So also using some more code and elements from the tutorial i was able to rig the body to bend its legs and also move up and down when on stairs which created a more natural movement and appearance when moving around the environments in my experience as seen in the images below: