Is Overlapping Component works only when the character moves?
I have this third person character blueprint in which I'm trying to hide the character mesh if the CameraVisibilitySphere component overlaps the character. It actually works, but only if the character moves.
If simply I move the character close to an object, rotate the camera so that it collides with the object and gets closer to the character, the mesh won't disappear. But if I just move the character a bit, no matter in what direction and so that the sphere still overlaps with the character, Is Overlapping Component returns true as it should and the mesh is gone.
When the mesh is not visible, without moving the character, and I rotate the camera so that the visibility sphere doesn't overlap anymore, nothing happens. If then I move the character, the mesh reappears.
What should I do to make this work?
Here's an alternative method:
You could try using the distance between the camera and the mesh as the determining factor for whether the mesh is visible or not. You won't have to deal with collision then.
I'll lay out the basics.
• Get the location of the mesh and the location of the camera.
• Subtract the two location vectors and then get the length of that.
• Check if the length (distance) is less than any arbitrary number like 10.
• If it's true, that means your camera is too close and you need to hide your mesh.
This didn't work either, but it did seem to be a step in the right direction? Hidden in the advanced physics portion of each collider is a toggle called "Should Update Physics Volume". This judges which objects movements can trigger an overlap event.
For anyone curious, this is the tutorial we're following: https://www.youtube.com/watch?v=DauWu4AkXak
Hello everyone, if someone is still having trouble with this, here's the solution.
Go into Mesh, search for Mesh Component Update Flag and change it to Always Tick Pose and Refresh Bones.
Changing this allow to On Begin/End Overlap events to fire even if the Character is not moving.
answered May 13 '18 at 03:52 PM
Cold as Me
This is old but I hope it helps others as I figured this out recently:
Any component that is attached to the camera is not going to trigger overlaps unless the player moves, so the workaround is to detach it from the camera component and, in the event graph, use a tick to set it's world position to the camera's location. It will then react to any overlap you want, even when the character is not moving. I'm using this to play an underwater sound when the camera gets inside water volumes and show water drops when it comes out.
answered May 15 '19 at 12:00 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here