Interactive objects in VR

For this project I used assets from the Multistory Dungeons pack in order to focus on the scripting part.
Interactive objects can be selected in VR using the Trigger button. It works with a linetrace, custom depth and a post process outline material.




Swords can be grabbed and used to smash different pieces of furnitures and props. I set the minimum velocity of the sword to 1000, but I think a slightly smaller value could also work.


I used the assets from the Over 9000 Swords pack, but I chose to use a much simpler randomization system that just needs 4 macros. 





The user can also turn on and off some of the candlesticks and lamps with the Grip button, through a Flip Flop node. The interactive ones can be selected from a distance using the Trigger button.


Tha lantern has a different mechanism: grabbing the lantern turns on the lights, while dropping it turns off the light and activates physics simulation.