First up, please forgive me if I’m not using the correct terminology to explain myself, I’m really new to UE4, and am currently learning as I go!
I’m working on a simple (no controller required) on rails VR experience where the viewer is flown through an environment from the POV of a ‘TravelCam’ (if this is the right phrase?).
But before this experience starts, I have the ‘PlayerStart’ set inside a black box (to simulate a void) under the map with some introductory text, and would like for the player to be able to trigger the start of the on rails experience by simple looking at (with the VR headset) a image for a second or two - Just like the Rift’s start up health and safety warning where it asks you to “Hover Over This box For Two Seconds To Acknowledge” the warning and progress.
I’m only just getting my head around the building and texturing these worlds - I really don’t know where to begin with this, so any help would be GREATLY appreciated!
Create a blueprint interface “ActivateInterface” with a function/event “Activate”.
Add this interface to the blueprint actor you want to use as a trigger. In the Activate function, place the logic for starting the experience.
In your pawn/character, make a “GazedActor” actor reference variable and a “GazeDuration” float.
On tick make a trace forward from the camera (google it). If you hit an actor, compare it to GazedActor and if equal add tick time to GazeDuration.
If the hit actor is not the one stored, store the hit actor in GazedActor and set GazeDuration to zero.
Check if GazeDuration is greater than the time you want for triggering, if so call ActivateInterface->Activate on the hit actor. (It will fail silently if the actor do not implement ActivateInterface.)
HavockX, thank you so much for taking the time to reply. Currently, most of what you said is currently like sanskrit to me, but it, gives me a very solid place to start - I genuinely appreciate it.
I’m going to make an empty project with the sole purpose of trying to make this work, wish me luck!
Hey Havock, after 2 days of casual tinkering, I’m having zero luck getting anything to play. I can’t even find the “ActivateInterface” function - It’s clear I still have a lot to learn.
If you have a moment, here is my test project (only 7mb):
This is printing to screen anything that I am looking at, including the ‘Blueprint_Trigger’ I made:
But beyond that, I must have tried 100+ combinations of things using the ‘Activate Interface’ suggestion to get the Matinee to play and PoV to shift to the other camera without success.
I’m starting to get quite disheartened by my apparent inability to understand why things aren’t working.