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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Rotation/Transform Locked Objects With Leap Motion

Hi All,

I want to use the leap motion to open/close doors and open/close drawers. Is it possible to use the leap motion to interact and grab a specific area (like a door handle) and swing it open, but locked into the only rotation a door would open, and then stop where it should.

The same rules for sliding open a drawer, then sliding it back into place. Basically, is there a way to set the limits of where an object can be moved, transform and rotation.

I suppose this info would be helpful even without the leap motion, but if you have any info that would really help.


Product Version: UE 4.17
more ▼

asked Oct 11 '17 at 04:02 PM in Blueprint Scripting

avatar image

167 33 46 51

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

1 answer: sort voted first

You can use physics constaints or vector mask, if you use scripts to move object. Physics constraints are pretty obvious, so I'll explain another approach. For example, you have to script a drawer. After asigning current shift (float), you can multiply it by vector mask and pass result to AddRelativeLocation. Vector mask is basically normalized vector with value == 0 on locked axis and value > 0 on unlocked axis. For example, (0,0,1) would move only up and down relatively.

more ▼

answered Oct 12 '17 at 08:26 AM

avatar image

1 1 3

avatar image Dark_Jubei Oct 27 '17 at 08:47 AM

Hey KelbornKad, thanks for the response, I've been trying to implement your method but at the moment I'm struggling somewhat. I'm not great with blueprints, so please bear with me.

I basically have a player pawn, that has a cube attached to it acting as a "hand" - that calls a class event when my "hand" object comes in contact with the "drawer" collision. I also have a vector variable tracking the world location of my "hand" object and plugged that into a pin for the class event.

Then in the "drawer" blueprint, I have the class event that will respond to the "hands" movement, in this case, I want to move only the X location, nothing else. However, here is where I'm stuck. If I plug the X location from the vector variable (from the hands location) into the "AddRelativeLocation" the draw just flies off into 3d space, not sure what I'm doing wrong?

(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