How to creat an platform elevator in VR?

Hello everyone,

I’m a very new vr developer and It’s my first post on the forum :slight_smile:

I would like to creat an elevator platform for my VR scene.
Actulaly I have the platform witch is moving up and down but I can’t get on it, I pass through.

Can you direct me to a solution? Maybe one of you has already done this type of thing in VR.

Thank you in advance and happy new year to all!

Hey there @Willbinet! Welcome back to the community! So basically the base VR pawn does not have any collisions, you’re basically a ghost HMD and hands centered around the root. To be able to follow the platform you’ll need to do a number of changes to the base pawn depending on your locomotion options.

If your locomotion is just teleportation you won’t need to add any type of collision to your pawn. If you have free movement you will need to have a collision component as the root for the platform to move your entire player.

Teleportation (easier): You could piggyback off of the teleportation logic’s trace to detect if the object you’re teleporting to is indeed a platform, if so you’d use AttachToActor and keep it’s world position to attach your player to the platform when on it. Then your root will follow the platform. Then if you teleport off to a static object, you would just Detach from the platform you were on at the end of the teleport.

Free Locomotion (harder): This one is a bit trickier in some ways and easier in others. Basically you’ll need to replace the default scene root in your VR pawn with a collision of sorts and you’d have to handle your own locomotion with a form of pawn movement. Alternatively you’d be able to reparent the VR pawn from pawn class to a character class so you can get the standard handling of a character with less manual handling of movement.

Hello SupportiveEntity!

Thank you very much for your answer! I’m gonna try it right now :slight_smile:

I will keep you in touch.

Thanks again

Absolutely! If you need inspiration or just want it a bit more out of the box, I have one more thing which is just a plugin recommendation. I use this plugin for all of my VR projects as it has much extended functionality to the sample unreal provides, though it’s mostly in C++ so to modify it you may need to get your hands a bit dirty. That said, it comes with an advanced character class made for VR, including collision and a way for enemies to target the VR player. The grip and gesture system are also insanely good!

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

https://vreue4.com/