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"

VR interactivity constraints?

I am trying to interact with objects in my VR game, and most tutorials I see are for free moving objects, but I am not looking for that. I specifically want to interact with objects that have constraints. For example: levers, hinges, sliders, etc. And also some objects that can be moved only in Z and Y (pitch and yaw), with a constrained pivot, sort of like a mounted gun.

Here is my WIP, so far I want to focus on the gun functionality, and then move onto the levers and stuff.

link text

Product Version: UE 4.19
Tags:
more ▼

asked May 24 '18 at 07:16 PM in VR

avatar image

live4film
5 1 6

(comments are locked)
10|2000 characters needed characters left

4 answers: sort voted first

VRExpansion plugin handles pretty much all of that, if you don't want to use it in your project you could probably download the demo and see how it is handled there.

more ▼

answered May 30 '18 at 08:44 PM

avatar image

shardfall
96 1 2 7

(comments are locked)
10|2000 characters needed characters left

I tried installing it a while back, never worked even with all the visual studio installs and updates. It was a nightmare.

more ▼

answered May 31 '18 at 04:38 AM

avatar image

live4film
5 1 6

avatar image live4film May 31 '18 at 04:33 PM

Here is where I am at now. https://vimeo.com/272712637
I tried something called Mitch's VR Templates. It has a lot of the functionality of what I need, however they all pertain to a single axis. When I try to combine an actor with both a pitch and yaw function it only does the yaw. The yaw was basically code for a door, I just extended the max and min angle to be -45 , 45.

The pitch is in parented below the yaw so they move independently. I included the blueprints:

You'll notice that there are multiple functions that work with my VR pawn character. There is a 'drag start' 'drag' 'drag stop'. The top portions are for the yaw, where I didn't mess with the original blueprint, just replaced it with my meshes. Below that is a duplicate of the yaw nodes, but I just switched the meshes and the axis to be pitch. But still only the Yaw works.

alt text

alt text

alt text

alt text

alt text

[1]: /storage/temp/242739-hierarchy-wip.jpg

hierarchy-wip.jpg (15.3 kB)
event-graph.jpg (150.2 kB)
drag-start.jpg (174.3 kB)
drag.jpg (191.2 kB)
drag-stop.jpg (128.0 kB)
(comments are locked)
10|2000 characters needed characters left

Your code is startsimulategunphysics for pitch, but you have the gun going to door physics, might be part of the problem.

more ▼

answered May 31 '18 at 04:55 PM

avatar image

shardfall
96 1 2 7

avatar image live4film May 31 '18 at 05:51 PM

Ok I'll take a look. Sorry about the weird naming, the comments say 'door' because that was in the template. The original purpose of the simulate was to let go and have the gun still move slightly and slow down to a full stop. It was a cool effect but not totally necessary. Thanks!

avatar image shardfall May 31 '18 at 05:52 PM

If that doesn't work out for you let me know and i'll actually do some testing for you, but i really think your problem is that simple.

avatar image live4film May 31 '18 at 06:03 PM

Cool thanks. I'll check tonight when I get home from work.

avatar image live4film Jun 01 '18 at 03:24 AM

It did not work unfortunately. I suspect it's an issue with child component inheritance overriding my rotations. I can send you my project. I made a clean simple version to get started with. I'm uploading it to my google drive right now. I'll give you a link when it's ready.

avatar image live4film Jun 01 '18 at 03:53 AM

Here is the google drive link to the project. FYI, the gun movement uses the VIVE controller, and it's using the grip buttons, not the trigger.

https://drive.google.com/open?id=1rn3jwLOQD_E8R62KOkyIuifvg5vkYTv3

avatar image shardfall Jun 01 '18 at 03:59 AM

alright i'll be home in about an hour or two and i'll check it out for you. Should be able to get it straightened out tonight, or at least narrow down the problem for you.

avatar image live4film Jun 01 '18 at 04:01 AM

Thank you! I really appreciate it.

avatar image shardfall Jun 01 '18 at 04:26 PM

Well i downloaded it to take a look, but the project you sent was very broken, based on errors it looks like multiple missing classes. Example: Can't find file for asset. /Game/ExampleContent/VR_World_Interaction/Blueprints/InteractiveObjects/BP_MG_O plus many more, most are just meshes so not a big deal, but the BP classes that are missing make it to where any code through blueprints you had in the project are completely broken so i don't even have a basis to start looking for you.

avatar image live4film Jun 01 '18 at 04:46 PM

Ok I'll try and clean it up more. Or just send you the full file. I probably deleted too much when trying to slim the project down.

avatar image shardfall Jun 01 '18 at 05:01 PM

I don't mind large file sizes if you want to send the full file to make sure it's good.

avatar image live4film Jun 02 '18 at 03:12 AM

Here is the new link for the larger file. https://drive.google.com/open?id=1MRXSHdZD119PInm4m782sNtyy49HY82R

It contains a lot of the VR templates from the original file, like doors, levers etc... you can look at those too and see how those are setup too. BP_MG_Test should be the main gun blueprint with all the parts. There is also a backup folder with all of my iterations.

Hope this one works out.

Thanks again.

avatar image shardfall Jun 02 '18 at 11:05 PM

got it pretty much working for you, you had a lot of redundant code that was overwriting itself, and somethings just pointing to the wrong area. It's a bit cleaner now, want me to zip up and upload the project or just show you the blueprints?

avatar image live4film Jun 02 '18 at 11:20 PM

If you could upload that would be great. Thank you so much!

(comments are locked)
10|2000 characters needed characters left

Here's the updated file. Combined the yaw and pitch into single handlers, got rid of the gun handle event entirely, changed the initial offset to also include an initial pitch offset, updated the atan2's to correctly use x and z for the pitch, and cleaned up the start and stop drag functions as well. If you have any questions about it let me know. Gun Test Download

more ▼

answered Jun 03 '18 at 12:16 AM

avatar image

shardfall
96 1 2 7

avatar image live4film Jun 03 '18 at 06:08 AM

Yeah that works! Thank you for fixing that. Is there a way to get the pitch to be more sensitive? It's easy to move the yaw, but if I move my hands up and down too fast it lets go of the gun and gets stuck and I have to grab it again.

avatar image live4film Jun 07 '18 at 03:05 AM

Hey just following up :) Did you get my note about the pitch sensitivity?

(comments are locked)
10|2000 characters needed characters left
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