microsoft / MixedReality-UXTools-Unreal

UX tools and components for developing Mixed Reality applications in UE4.
https://microsoft.github.io/MixedReality-UXTools-Unreal/
MIT License
316 stars 86 forks source link

Hello, I made a blueprint. There is a static mesh in it. When the collision of the object is opened after a delay of 8 seconds, the object still can't be grasped. #35

Closed YiRonger closed 3 years ago

YiRonger commented 3 years ago

Hello, I made a blueprint. There is a static mesh in it. When the collision of the object is opened after a delay of 8 seconds, the object still can't be grasped. image

camccaf-msft commented 3 years ago

Hey @YiRonger! The cube's initial collision configuration isn't visible in your screenshot but the most likely cause of this behavior is setting the Collision Presets property on the cube to NoCollision instead of setting just the Collision Enabled property to No Collision.

The subtle difference here is that the NoCollision preset disables visibility trace responses, which don't get re-enabled when using the Set Collision Enabled blueprint node. This is what prevents the manipulator from detecting the cube when you enable collision.

The fix for this is to set the cube's initial collision settings as follows: CollisionSettings

This way the traces are still enabled will start responding again when you call Set Collision Enabled from your blueprint.

EVRTOP commented 3 years ago

Hello, thank you very much. This problem has been solved. There is another problem. I tested the example of catching cheese. Why can I catch it before my hand touches the cheese?

camccaf-msft commented 3 years ago

This is actually expected behavior, we have a cone that extends out of the hand that triggers the change between near and far interaction modes and anything within this cone is considered close enough to be grabbed. You can see this cone using Unreal's Visual Logger. VisualLogger

This cone is configurable through the Proximity Cone ... properties on the UxtHandInteractionActor. Unfortunately these properties aren't exposed on spawn, to modify them you will have to place the UxtHandInteractionActors in your scene manually instead of spawning them programmatically. ProximityConeConfig.

EVRTOP commented 3 years ago

Oh, I understand. Thank you so much.

EVRTOP commented 3 years ago

Hello, one more question,

Now, an object is hidden and can still be caught.

How to make an object hidden without being caught and displayed before it can be caught?

camccaf-msft commented 3 years ago

No problem! That's another gotcha with Unreal where hiding an actor doesn't disable its collision volume. What you need to do is hide the actor and disable it's collision when you want it invisible and then re-enable both when you want it to be seen / caught again. This would be done using the Set Actor Hidden In Game and Set Actor Enable Collision blueprint nodes.

YiRonger commented 3 years ago

No problem! That's another gotcha with Unreal where hiding an actor doesn't disable its collision volume. What you need to do is hide the actor and disable it's collision when you want it invisible and then re-enable both when you want it to be seen / caught again. This would be done using the Set Actor Hidden In Game and Set Actor Enable Collision blueprint nodes.

Oh, I see. Thank you very much!

camccaf-msft commented 3 years ago

No problem, I'll close this issue but feel free to create another if you hit any other bugs in UXTools!