Hello, Im creating a VR demo and tried activating a Trigger Volume when I teleport (strictly to pre-defined locations) using Set Actor Location and want to trigger some widgets to disappear. However this does not seem to trigger the Trigger Volume’s Being Overlap or End Overlap. I tried creating a collision VR pawn but 1. I kept falling through the ground and 2. could no longer use my controllers to point and interact with things. I am wondering if there is a quick way I can trigger Trigger Volumes. OR generally trigger an event based on proximity. Any advice would be be much appreciated, cheers!
Cheers for the quick reply mate!
But man theres a lot im not getting (as in what to do after), perhaps a bit of context would help. I think I managed to trigger the Trigger Box via attaching myself to a Keyframed Sequence and moved to the spot very quickly haha (checked via a simple Print Text).
But really what i want to achieve here is having a floating widget (or 3D widget) that floats in the map as such to only appear once I am there (then disappear when user leaves the Trigger Box).
Firing specific logic on the overlap events is a sane idea. (I can imagine a system where the overlap trigger has an array of actors/widgets placed in the level that it sends commands to when overlapped)
But a more ‘hands off’ approach would be the distance idea. I threw together this BP which constantly checks how far you are away and shows/hides accordingly.
Also, come to think of it - you wouldn’t need a ‘BoxCollision’ component any more since all you are comparing against is a point in space. Happy to chat more if you are trying to go with a different approach.
This is great! Thank you so much.
I had just constructed something similar while waiting for your reply.
BUT
I think im at a last roadblock that is VR specific.
I set the Target Actor to be the a cube mesh on the level, which I have implemented in another way before and worked for that. I hope this makes sense.
So it should be checking the distance that is between the Player and the black box(Target Actor) seen below the widget that im trying to make appear(visibility set to On for visualization purposes, will make widget Visible Off when actually running the game).
If getting Player Pawn → Camera Component → Camera components world location is working you dont need to cast at all.
But, you’d be looking to Cast to ‘VRPawn’ in this case (assuming you’re still using the default VR template pawn), that allows you to get access to all the components. (The reason you’d want to cast in this case is that it allows you to be really specific as to what you’re testing distance against.)
Alas, thinking about this more: there is an even ‘quicker and dirtier’ way that I just verified.
Get Player Pawn → Get Actor Location → (Returns vector of pawn location that can be used)
Hey mate! I got it working with your distance calculation method! Thank you so much!
I will still need to figure out how to use trigger boxes as it allows for more controlled and simultaneous trigger within an area i.e. all widgets appear simultaneously where as distance calculation requires me to manually key in values for each widget and create the illusion of all of them appearing at the same time. I never dealt with Collision Channels as you mentioned in your first reply but Ill have a look. Thanks again mate!