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"

Hand Swapping in VR

I have a basic pickup and drop implemented for VR. I can't for the left of me think how get round the problem of the player swapping items in the thier hands. If I move an item from left to right, its still classed as a left item, meaning the controls on the left motion controller will activate the item in the right!

alt text alt text

alt text

You pickup with the trigger, drop with the grip. I want the trigger to be able to pick up the gun and then fire it for example, that part works OK. I'm using an interface to pass over the trigger for example to the actual item (there are two interfaces, one for each hand).

I am using an actor blueprint as a parent with one SM component and a SKM component. I make a child of this, add the appropriate meshes and blueprints to that, like the gun for example.

alt text

When I swap an item in my hands, two things go wrong. If I move from left to right, then the left hand controller still shoots because its still classed as a left hand item.

Second, if I collect the item in my left hand, swap it to the right hand and then drop it, the left hand still thinks it is holding an item and I have to press the grip to clear the bool even though there is nothing in my left hand anymore.

I hope this makes sense!

I know I only have to tell the game that the left hand item is now in the right hand, and clear that bool, but I have no idea how to set that up or where it should go. I'm guessing an == node and setting the left hand item as the right hand item and clearing the left hand.

Product Version: UE 4.14
Tags:
more ▼

asked Dec 02 '16 at 08:22 PM in VR

avatar image

GruntosUK
1 1 1 1

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

1 answer: sort voted first

I actually solved it, I've tried breaking it but can't seem to at the moment, there's probably some edge case that will appear later down the line no doubt. or if anyone can think of one, I'd be pleased to know.

First thing, I only need one BPI for the motion controllers, not one for each controller, because I am using the item and the hands its in as a target.

For clearing data when a hand is swapped, I'm checkin at the end of the pickup that the item has come from the right, if it has I'm copying it to the left and then removing the right data at the end.

alt text

more ▼

answered Dec 02 '16 at 09:37 PM

avatar image

GruntosUK
1 1 1 1

(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