Comments (6)
Hi @TresSims,
I think that this is the behaviour that you're looking for:
The cube starts as magenta and grabbing it with a single hand allows movement but doesn't change the color. When you grab with two hands, its color changes to yellow and transformations are disabled (I think that this would be equivalent to your "unfold"). Then it goes back to red whenever interaction ends (fold back?).
This is the Blueprint that I used:
Pleae note the configuration of the UxtGenericManipulator
, which allows both one and two hand interactions but disables transformation with two hands, so you can add your custom logic for it. The call to GetSecondaryGrabPointer
will only return true
when there are 2 pointers, so it's a slightly simpler trick than getting the array of pointers and taking its length, but that should work exactly the same.
You probably want some more specific conditions for OnEndGrab
, for example keeping a counter of pointers that were grabbing and doing one thing when 2 were released and something different when only 1 is. I think that the component should give you enough flexibility for this kind of checks.
An alternative would be implementing your own manipulator in C++, potentially inheriting from UxtManipulatorComponentBase
.
Please let us know if this works for you.
Thank you!
from mixedreality-uxtools-unreal.
Hi @jjimenezg93
Thanks for your response! I'm more than happy to provide any information I can to help.
This screenshot shows the setup of my blueprint, including the event
This is currently happening using both the virtual hands in the play in editor experience as well as after the application is built and run on a Hololens 2 device.
I also tried modifying that file to use a counter of how many times the "On Begin Grab" and "On End Grab" events fire for the one handed interaction mode to keep track of how many pointers are interacting with the component at once, but both events were firing seemingly simultaneously, meaning my counter never registered any pointers interacting with the component.
I am happy to share any further information I can but am not sure what else would be relevant, so please let me know!
Thanks!
from mixedreality-uxtools-unreal.
Hi again @TresSims,
I've realised that you have both a UxtGrabTarget
and a UxtGenericManipulator
. The latter inherits from the former and, with this setup, they're both receiving an OnBeginGrab
event and calling NotifyManipulationStarted
(from here). This function tells other manipulator components in the actor that they have to release their manipulation because a new one started. I replicated a simplified version of your setup and this is what's causing the issue.
If all you need is basic manipulation behaviour that allows you to grab your actor around, you could remove the UxtGrabTarget
. Then, instead of subscribing to the OnBeginGrab
/OnEndGrab
events of that component, you could subscribe to the same events in the UxtGenericManipulator
.
This should be enough unless you specifically need to have both grab targets acting on different primitives in the actor simultaneously. That's not supported at the moment, so could you please confirm that this is not your intention?
Please let us know if removing that component fixes your issue and the resulting setup fits your needs.
Thank you!
from mixedreality-uxtools-unreal.
That will work perfectly, thank you so much for your support!
from mixedreality-uxtools-unreal.
Hi @TresSims !
I'll look into this and get back to you during the next few days.
Please consider sharing further details or a screenshot of the blueprint if that's possible, as the more details the easier it'll be for me to reproduce your issue.
Thanks!
from mixedreality-uxtools-unreal.
Thanks for your help @jjimenezg93 ,
I do have a reason for having both. The UxtGenericManipulator
I am using as you have described for the basic manipulation behavior, but I want separate logic to trigger when the object is grabbed with two hands, so I added the UxtGrabTarget
that would only trigger those events when it is interacted with using both hands.
The idea is that when you are grabbing the object with one hand, you can move it around and manipulate it as you would expect, but when you grab the object with two hands, it "unfolds" into something else.
This was something that I had working in what must have been a previous release, however I can see now that I have set this up in a weird way, is there a more recommended way to implement this type of functionality?
Thanks again for you help!
from mixedreality-uxtools-unreal.
Related Issues (20)
- delete inputaction mapping HOT 7
- "reposition" speech command not working with OpenXR in Unreal Engine 5.0.1 HOT 2
- node 'Remove ARPIN from Local Store' not working HOT 1
- Suggestion - Use widget components for text in buttons etc. for more compatibility with fonts. HOT 2
- Issue - Scrolling Object Collection does not hide HOT 5
- Error with Anchors in UE4.27 and uxtools 0.12 HOT 1
- How to use OpenXRMsftHandInteraction Input in UE5? HOT 2
- Better documentation for requierd settings HOT 2
- Oculus Quest 2 - Text is very difficult to read from any distance on Quest 2 HOT 4
- Input Events are not firing [UE5] HOT 10
- QRCode Tracking Issues [UE5] HOT 15
- Unreal 5.1 Support? HOT 18
- Unable to Interact with any Controls on Quest HOT 2
- Sound doesn't appear to work in packaged UE5.1.1 for Hololens 2 HOT 5
- Packing successfully, but failed to open the sample level properly.MRTK Example projects in versions 5.0 and 5.1. HOT 5
- Support for UE 5.2? HOT 2
- Client-side Hand Interactors
- When loading the UE4.27ux tools plugin, the software prompts that the engine cannot load
- Correction for simulated movement with enhanced input in public/0.12.x-UE5.1
- How to use OpenXRMsftHandInteraction Input in UE5 without uxtools
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mixedreality-uxtools-unreal.