Project Oxytocine Machine 2.0

What is this project about?
Project Oxytocine Machine 2.0 is a prototype project for StudioVRIJ, it's a project where people from long distances can have a deep personal connection with each other via Virtual Reality.
We were comepletely free in designing & creating interactions for this project, the environment would be a dreamy forest where you sit on mushrooms.
We were also free in designing & creating an entire different environment, but we liked the idea of this happening in a forest.
Interactions are that when the player does or touches something, something happens.
Like for example if the both players touch each others hand, the hands will glow up.
Project date: From May 2024 - Juli 2024
Project duration: 2 months.
Development Team: 4 developers & 4 artists
Engine: Unreal Engine
Programming language: Blueprints
You can watch the video below to see the gameplay, video was recorded on a meta quest 3.
My role & contribution in this project.
My role was being a programmer for this project, my contribution is creating & developing the touch interaction, the animal interaction and the handtracking.

When you touch the animal (frog in this case) the animal will walk away for moment & come back. What happens is when you touch the animal, a timer will go off.
When the timer is going off, by using a timeline node it will walk in a direction specified in the “Add Actor World Transform” node. So when the timer goes off, it will move in 0.5 Y direction with the speed being 0.5. Then when it has reached its destination, it will come back with a speed & direction of -0.5 Y.
When the timer counts down, it will first check to see if the timer is going down.
When true the timer will go -1 every delta seconds. Afterwards it checks if timer has reached its threshold.
When true then the timer will be reset & timer is stopped.
When the timer counting down is false, then it will check if the timer has been stopped.
When true it will count back with +1 every delta second, when it has reached a threshold then the timer will be stopped & it will be reset again.
For the touch interaction I've made it so that when your touching the other players hand, your & their hand will glow up.
When the collider of the hand collides, it will set the boolean overlapping for left (or right) hand true.
Then it will cast to the VRPawn where it will get the amount of players, then it will check if the amount of players is not equal to player number.
When true it will set the overlay material to cyan for the remote oculus hand left (or right depending which hand is overlapping).
When you're overlapping, a float will go into a macro where the float will go up +1 every 0.4 seconds.
Then it will come out of the macro & check if the float is higher or equal to 15.
If true then it will set the float to 15 & stop the macro.
When you're no longer overlapping with the other players hand it will set the boolean back to false, set the timer to 0 & set the overlay material back to its basic material.
I first used an “Event tick” for this interaction, but later found out that when left hand stops colliding with the other left hand.
The right hands will stop from glowing up from 0 to 15, that happens because when a hand stops colliding the event tick is disabled.
So I knew that I had to replace that with something else, something that isn't depended on an event tick.
Because otherwise the hands will stop glowing up midway.
So then I decided to make a macro called “For Each Loop With Delay Plus Left”, in this macro a float will enter.
The float will then be assigned to a value, then it will check if the hand is overlapping.
When true the float that entered the macro will get +1, the result of that will then be added to a “Primitive Data Float” of a material.
It will be added every 0.4 seconds, the “Primitive Data Float” is a parameter from a material.
When the parameter goes up, the material will be more emissive (More glowing).

After adding the new float to a “Primitive Data Float”, it will then check if the float is higher or equal to 15.
If it is not higher or equal to 15, then every time it is lower then 15 it will reset the assign process, making it do the process again until it has reached 15.
When it has reached 15, a boolean will be set to true & the loop will be completed.
For the handtracking I used the Meta XR plugin from the Unreal marketplace, with that plugin & the help of a video I managed to create handtracking.
We also had to make some changes compared to the video, for example we tried to test the handtracking after we thought it was done but the hands weren't on the correct location.
The hands we're 180 degrees rotated the wrong way, so when you put your hand on the table and then flip it, that's how it looked like in VR.
So we fixed that by changing the rotation in the blueprint, now the hands spawned correctly and move correct as well.
Retrospective
This project was lots of fun doing, I learned many new things.
For example I learned how to make a macro with an delay & I learned how to make handtracking for an VR project.
This project also went quite smooth when it came to our sprint reviews, every time StudioVRIJ was quite happy with our work.
We did get feedback as well, it mostly came to lighting & performance. This project was in overall a 10/10, really good solid project to do.
I'm excited to see what StudioVRIJ will be in the near future, I would love it if I can make a project like this for them again.
I enjoyed making the interactions & testing the interactions, what I also loved is that when other people played it they really liked it.
So that felt really good, this is a project to remember.