I want to use a static mesh as a boundary. When the player enters this boundary, they will take damage and be knocked back, similar to lava. However, I am facing difficulties in setting up the collision for this static mesh. I need to know the position and direction of collision between the player and the lava at the moment the player enters the lava. This clearly requires collision detection rather than overlap detection.
However, if I use collision, the player’s body won’t enter the lava area. On the other hand, if I use overlap, I won’t be able to obtain the normal impulse information like in collision events. Is there a way to both respond to collision events and allow the player’s body to enter the lava area without actually blocking them? If there is a method like that, how should I configure the collision settings for the player capsule and the lava area?
Hey @DarkRadiance1983,
Rather than use the direct surface of the lava, could you not place your collision slightly below it? That way there will be a collison, then if needed you could also add a pain causing volume up to the surface.
Any additional specifics you provide may go a long way in solving your problem!
Hey @DarkRadiance1983!
Checking in! Are you still having an issue with the lava and overlap? Was the above the solution you needed?
no… I still haven’t found a solution to this problem. Do you have any new ideas?
Hey @DarkRadiance1983!
Sure, but given the current context it may be hard to pinpoint exactly what you need and where. Could you provide screenshots and/or a visual aid of what you need so we can better address what you are trying to achieve?
The more info/specifics the better!
Hi, sorry for not replying for such a long time. Do you remember me? After our last conversation, I went on a business trip and just came back to continue my UE learning.
Here’s my question: I have created a damage area using a Static Mesh Actor as the parent class. I want it to behave like traps or lava in some old 2D games, where the player gets bounced back when they touch it. However, I don’t want the player to be instantly pushed away as if they stepped on a rock. I want the player to be able to enter a certain range within the damage area, and I also want to know the direction the player enters when they do.
I’m searching for the required event from the available ones. The first one that caught my attention is the “On Component Hit” event, mainly because it can provide me with the “Normal Impulse” and “Hit” information. However, I’ve noticed that if I make the relationship between the character and the damage area overlap, the “On Component Hit” event won’t be triggered even though the character can enter the damage area.
If I want to trigger this event, I found that the only way is to set the collision relationship between the character and the damage area to “Block”. This way, the event will be triggered immediately when the player collides with the area. However, in this case, the player won’t be able to enter the damage area, as if they were standing on a rock.
So I tried another event, “On Component Begin Overlap”. This time, the triggering and effect were as expected, but it doesn’t provide the “Normal Impulse” and “Hit” information.
So, do you have any good solution that can meet both of my requirements?