Announcement

Collapse
No announcement yet.

VR Expansion Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by Szheng1323 View Post
    mordentral Can you show me a screenshot of where I would add in to trigger a highlight method? I know that it would be under the BP_Teleport_Controller, but I still can't seem to figure out which part of the blueprint.
    When the laser is active? I don't have anything running consistant traces unless the laser is active, at that point you would look in the UpdateLaserBeam function to see that there is a LastLaserHitResult variable that you can use.

    If not when the laser is active, then you can run a consistent trace anywhere you want.

    Leave a comment:


  • replied
    mordentral Can you show me a screenshot of where I would add in to trigger a highlight method? I know that it would be under the BP_Teleport_Controller, but I still can't seem to figure out which part of the blueprint.

    Leave a comment:


  • replied
    Originally posted by PixelsDesign View Post
    Hello, we have an issue with the HMD and its replication.
    We don't know why, the hmd call the replicated variables only when it is not in our head... Somone know why?
    Are you pausing the character movement or the game when the hmd is off the head? It functions correctly by default so unless you are interferring somewhere it shouldn't have that issue.

    The only thing that would stop it would be the actual HMD not tracking, or the ticking being stopped.

    Leave a comment:


  • replied
    Hello, we have an issue with the HMD and its replication.
    We don't know why, the hmd call the replicated variables only when it is not in our head... Somone know why?

    Leave a comment:


  • replied
    Originally posted by edstoica View Post
    hello,

    I have an issue here which keeps me banging my head against the wall for days now...

    Our current project is set up as a VR project, but we like to use it in desktop mode now:

    I need to "teleport" the player in the level, for this I use the "TeleportNowVRPlayerLocationAndRotation" Node, followed by a "SetActorRotationVR"node.

    But after every teleport, I get a x-axis offset of 8cm,
    even when I teleport to the current location/rotation.

    This offset varies from different computers and headsets. On oculus, I get an additional z-offset of 175cm, sometimes 168cm

    To investigate that, I printed out the VR-Expansion Functions values:
    "Get VRLocation"
    "Get VRHeadLocation"

    here, I can see the offset. the "VRHeadLocation" is -8cm on x-axis compared to "VRLocation"


    My question is:
    1: Where does this offset come from? How can I zero it out?
    2: Is there a "non-vr mode" or "desktop mode" setting for the VRExpansion Plugin?


    any help is very welcomed, since I am close to a mental disease here...
    That offset is in the root component and it pushes the capsule back from the face, its the CapsuleOffset variable. The "GetHeadLocation" node is just a shortcut to getting the transform of the camera. The way that VRLocation works is that the offset is considered the "body" location, since it is inset from the eye perspective (foot position when standing).

    Actor Location = Foot level (Z = 0) center of tracked roomscale
    VRLocation = Capsule location, offset from HMD (at waist level since that is standard for characters).
    HeadLocation = Actual location of the camera

    If you wanted to teleport in place you would SetActorLocationAndRotationVR to VRLocation, but subtract the half capsule height from Z, that would place your "foot position" at the same spot. Basically the inverse of the standard engine teleport of adding half capsule height to a trace hit for teleporting.

    If you used the TeleportTo node against a world location (like a floor hit) you can use the shortcut node:
    https://vreue4.com/GeneratedDocs/VRE...tLocation.html

    Which would offset the location to make the correct target.


    If for some reason you want the "camera" and not the "body capsule" placed at the teleport location, you can just get the delta from HeadLocation and VRLocation and add it (well that or remove the capsule offset, though that is generally not the best idea).

    As for the oculus setup, it sounds like you aren't in roomscale so basing off of the head is going to be different at eye level.


    The template has a teleport setup using the replicated teleport action.

    https://i.imgur.com/Uy9E9bY.png
    https://i.imgur.com/1xEiKJE.png

    It accounts for the delta rotation that the epic templates teleport has.

    Leave a comment:


  • replied
    hello,

    I have an issue here which keeps me banging my head against the wall for days now...

    Our current project is set up as a VR project, but we like to use it in desktop mode now:

    I need to "teleport" the player in the level, for this I use the "TeleportNowVRPlayerLocationAndRotation" Node, followed by a "SetActorRotationVR"node.

    But after every teleport, I get a x-axis offset of 8cm,
    even when I teleport to the current location/rotation.

    This offset varies from different computers and headsets. On oculus, I get an additional z-offset of 175cm, sometimes 168cm

    To investigate that, I printed out the VR-Expansion Functions values:
    "Get VRLocation"
    "Get VRHeadLocation"

    here, I can see the offset. the "VRHeadLocation" is -8cm on x-axis compared to "VRLocation"


    My question is:
    1: Where does this offset come from? How can I zero it out?
    2: Is there a "non-vr mode" or "desktop mode" setting for the VRExpansion Plugin?


    any help is very welcomed, since I am close to a mental disease here...
    Last edited by edstoica; 02-18-2021, 01:34 PM.

    Leave a comment:


  • replied
    Originally posted by Szheng1323 View Post
    I took a look at the blueprint for BP_Teleport_Controller, it shows that there is a laser highlighting object. Is that to highlight the object? If so how do I get it to highlight the object because it doesn't look like it does.
    Are you able to show me a screen shot of where the collision check is? I have been looking around and im not exactly sure which one it is.
    That is for the "toss to hand" function in there, it doesn't highlight currently. You could trigger a highlight on an object with any standard highlight method (inverse copy, custom stencil, ect).

    Leave a comment:


  • replied
    I took a look at the blueprint for BP_Teleport_Controller, it shows that there is a laser highlighting object. Is that to highlight the object? If so how do I get it to highlight the object because it doesn't look like it does.
    Are you able to show me a screen shot of where the collision check is? I have been looking around and im not exactly sure which one it is.
    Last edited by Szheng1323; 02-17-2021, 01:25 PM.

    Leave a comment:


  • replied
    Originally posted by juliusD View Post

    How\Where do I " Override GetClosestSocketInRange" ?
    In the objects interface function overrides on the left side, the MeleeBase overrides that function if you want an example.

    Leave a comment:


  • replied
    Originally posted by endlessnoisuf View Post
    Hi !
    Any possibilities to make widget visible and interactable only on PC screen and not visible for VR Player? Could it be done without multiplayer thing? Can't really find out related functions in docs, but maybe someone can suggests some tricky way. Now I used to smoothly fade out HMD, disable stereo, add widget which now correctly positioned on PC screen, but this method excactly ruins user experience. And yeah, game controlled by second people on PC.
    Currently that is actually a rough ask, you would have to manually handle the mouse coords and render a custom texture to the spectator screen. Epic has had notes about properly handling screen space with multiple "players" with VR spooled up but they haven't gotten around to it for 5 engine versions or so.

    There is a marketplace asset that brings up a secondary "control" window that you can place UI inside of to communicate though, that should work fine if you are ok with the second instance.

    Leave a comment:


  • replied
    Originally posted by mordentral View Post

    The default implementation is to set a socket on the mesh where you want the grip to happen using the prefix name of VRGripP. Then if you wanted multiple locations you would make other sockets with VRGripP2 ect.

    You can override GetClosestSocketInRange to pass out any location (components, splines, procedural) though instead if you want on the object.

    As for the scaling, you would need to either do it before the grip initiates, account for it in the grip, or modify the grip transform post grip to account for it. Gripping stores a relative transform that it tries to keep objects too.
    How\Where do I " Override GetClosestSocketInRange" ?

    Leave a comment:


  • replied
    Hi !
    Any possibilities to make widget visible and interactable only on PC screen and not visible for VR Player? Could it be done without multiplayer thing? Can't really find out related functions in docs, but maybe someone can suggests some tricky way. Now I used to smoothly fade out HMD, disable stereo, add widget which now correctly positioned on PC screen, but this method excactly ruins user experience. And yeah, game controlled by second people on PC.

    Leave a comment:


  • replied
    Originally posted by mordentral View Post

    The docs don't really cover the example template, but if you go in to the character under the Gripping function category there is a function called "GetNearestOverlappingObject". You can change the multi sphere trace to a multi line trace or even a simple line trace.

    Its a multi trace by default as it allows you to use the GripPriority field to filter overlapping objects by their priority (IE: a slide on a weapon wanting to be picked over the weapon itself in most cases when a trace hits both).
    I switched the multispheretrace to a multilinetrace, but I still get the same behavior. I am guessing there must be other modifications necessary, I think I need to learn a bit more about these functions before I continue. Thank you so much for the help though!!

    Leave a comment:


  • replied
    Originally posted by BrettAlex88 View Post


    Ah excellent, I will try this right away! Is there anything in your documentation that speaks about how to change it from sphere to normal trace? This plugin is amazing, I will be joining your patreon to make sure this project continues indefinitely... you have saved me so many hours already!!!
    The docs don't really cover the example template, but if you go in to the character under the Gripping function category there is a function called "GetNearestOverlappingObject". You can change the multi sphere trace to a multi line trace or even a simple line trace.

    Its a multi trace by default as it allows you to use the GripPriority field to filter overlapping objects by their priority (IE: a slide on a weapon wanting to be picked over the weapon itself in most cases when a trace hits both).

    Leave a comment:


  • replied
    Originally posted by mordentral View Post

    You can use a normal trace instead of a sphere trace, it already attempts to pick up the first collision from the array of ones hit, but when in penetration it falls back to overlap. There are grip priority settings as well but it would be annoying to try and juggle that.

    The pickup selection is entirely blueprint in the template and up to you, can change it freely.

    Ah excellent, I will try this right away! Is there anything in your documentation that speaks about how to change it from sphere to normal trace? This plugin is amazing, I will be joining your patreon to make sure this project continues indefinitely... you have saved me so many hours already!!!

    Leave a comment:

Working...
X