x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Load new VR level on collision

I'm trying to emulate a mechanic found in the RunebergVR Plugin. Specifically, the mechanic where you load the demo and you collide a sphere with your pawn in order to load a new level.

I'm building off of the VR Template included in Unreal 4.18

My end goal is that a user would be able to put a helmet on themselves, which would loan another level. Once the user takes the helmet it off, it would transport them back to the previous level.

I've tried copying the blueprint of the sphere to a new object, but it doesn't fire. When I bring the demo spheres in, I can see part of it fire when simulating, but still, nothing happens. I have added a collision capsule to the default pawn.

I'm at a complete loss here, and would appreciate any help or pointers in the right direction.

Thanks.

Product Version: UE 4.18
Tags:
more ▼

asked Jan 08 '18 at 09:46 AM in Using UE4

avatar image

NoxIX
1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey there, the idea is that you use the get vr focus state to know if the helmet is on or off and keep a variable with the last value and check it every frame if it has changed. If on the last frame it was on and now it's off, you load previous level. To collide with the sphere you need to have somekind of component that will allow the collision to happen, so check your collision settings and once the event of collision fires you need to filter to see if it was the player that collided with him and not some other object, not needed if all other objects are static.

more ▼

answered Jan 08 '18 at 09:53 AM

avatar image

xlar8or
6k 161 129 304

avatar image NoxIX Jan 08 '18 at 09:56 AM

Hrm, I've added a collision box and it does seem to start to fire, but nothing happens.

Maybe I should just start a fresh blueprint. I hate to ask, but could you recommend a tutorial that would cover something similar?

avatar image xlar8or Jan 08 '18 at 10:00 AM

If you put a print on the collision box does it execute when the player steps into it? If it does then all you need to do is open a level from there. If it doesnt execute then you need to figure out why, try placing cubes in the world, set the as moveable, do f8 to unpossess and move them around in and out of the collision box area and see if they trigger.

avatar image NoxIX Jan 09 '18 at 08:21 AM

This is the blueprint I'm working with. It does not execute when a player steps onto it. Only when it is positioned on their head, as it were.

I was hoping I could simple alterate this to work, but it appears making a bespoke print would be the better alternative.

Right now, the only tutorial I can find to attach an actor to a HMD doesn't do exactly what I want it to. Or the blueprint doesn't seem to work like this one. Though, fwiw, I can't find a "attach actor to actor" node.

I think I get the concept, vrfocus state node, if yes open level X, if no, open level Y. Just have to figure out how to get a helmet (or any other object to attach.

avatar image xlar8or Jan 10 '18 at 05:10 PM

So you want to attach something physical to your HMD?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question