Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

VR Layers and Bug chasing

Most of the base functionality for VR play is now implemented! this means that the player can walk around and has the framework for basic interactions such as flipping tables, throwing chairs, opening doors and the ability to call interaction events/interfaces. This week I also dealt with several ongoing issues, such as the player being able to collide with held objects or "prop surfing" as it's known, this typically showed when the player would put any held object below their HMD and it would suddenly apply a lot of upward velocity resulting in them flying through the ceiling. To resolve this I added several layers such as Direct Interactables, Indirect Interactables,  Teleport Interactables, UI Interactables, and Player, then I implemented layer masking on all of the avenues of interaction, this will also prevent the player from teleporting with the "grab" rays and from using UI panels with the teleport rays.

The next major issues I had this week was with how I was handling turning on and off the "grab" raycast, initially I was just activating and deactivating the object itself however this results in the held item simply dropping to the floor if a player picks up an object with it and turns it off. I tried a few different solutions on my own, I tried reading through the documentation and I even consulted with one of our lab instructors to try and find a viable way to send a held object from the raycast interactor to the direct interactor. Eventually it seemed like there was a clear path after reading through the interactor events, by adding a listener onto the raycast interactor so it would then call the direct interactor so it would "take" the held object from the ray, but after putting some work into trying to implement it I found that it's not actually possible to invoke the required interactable event. However Occam's razor once again proved itself the old reliable when I realized that if turning off the object was the problem then just don't turn off the object, instead turn off the ray drawing and set the ray's distance to 0 so it won't interact with anything and it will still hold objects!

Now I just need to implement the basic mechanics my teammates are working on and then we'll be good to go for the prototype build!

Support this post

Did you like this post? Tell us

Leave a comment

Log in with your itch.io account to leave a comment.