Jump to content

VR Teleport Restriction


photo

Recommended Posts

In Unity we are able to easily restrict the user in VR to only teleport to areas we allow.  In Unigine we do not see that option...it's too easy for users to teleport into walls and ceilings etc...  I'ts obviously a user interaction error...if they knew what they were doing it would be fine...but restricting their abilities to only teleport to certain areas would be a huge feature request if it's not available.

Thanks.

  • Like 1
Link to comment

@morbid, any chance I could get you to go into a bit more detail.  Maybe a full step by step, calling out the right menu items etc?  I can handle creating the geometry and putting a mask property or something...if there is coding that may be a stretch.  

Thanks for any more help!

Link to comment
2 hours ago, trey.coursey said:

@morbid, any chance I could get you to go into a bit more detail.  Maybe a full step by step, calling out the right menu items etc?  I can handle creating the geometry and putting a mask property or something...if there is coding that may be a stretch.  

Thanks for any more help!

Hi!

  1. At first, you can set intersection mask for teleportation ray by this method: void VRPlayerVR::setTeleportationMask(int mask).
  2. Next, you have to select desired Surface in desired ObjectMesh* and set same intersection mask.
  3. You can use some meshes for teleportation in allowed areas.
  • Like 1
Link to comment
  • 1 month later...

Hi @moroz,

I was trying to follow your steps and it all seems very easy - I see the method setTeleportationMask just at the top of VRPlayerVR.cpp , but I still can't figure out how to assign the mask in the code. I have an intersection mask 80000000 asigned to my mesh in the editor - should I also input a numeric value in the code instead of "mask"?

void VRPlayerVR::setTeleportationMask(int mask)
{
	teleportation_mask = mask;
}

Thanks

Link to comment

Hi Moroz,

I tried your method but then I saw that the teleportation_mask variable is already initialized to 1 under protected in VRPlayerVR.h. So changing its value to the desired mask number did the job!

Thanks 

Link to comment
×
×
  • Create New...