Event hit dont fire when one Actor moves into another Actor.

So Ive tryed to make some basic things, made two actors with spheres as colliders, set both to BlockAllDynamicly and send one to another with SetActorLocation. When they crossed Event hit wont fire.( What am I doung wrong?

Hi Battou,

In the components tab, did you ensure that the actors have “Generate Hit Events” set to true? This may be what is preventing them from firing the function.

If you mean “Simulation Generates Hit Events” then yes, this checkbox is checked, and I thought this is for physics, but I don’t want any physics, just collision detections, no gravity, inertion and ect. Both actors have colliders as Root, both BlockAllDynamicly, both just actors, not Pawn or Character, no movement component, just SetActorLocation. Tried all checkboxes, still no luck in firing EventHit.(

Here is moving actor blueprint and collision settings of root. a5bb0315d1408254f238d0ff11e645f4b9d1ae53.jpeg

I think the problem may be that you’re using set actor location as your means of movement. I don’t know what you’re trying to do so I can’t offer an alternative, but if I had to make an educated guess, I’d say that that is the problem. I think that overlapping is more or less reserved for dynamic, continuous movement rather than teleportation type of movement.

Edit: I have an idea - right after you use the set actor location node, try using a GetOverlappingActors node and filter it down to the class you’re looking for. Then if there is a match, do whatever you were originally going to do in the OnBeginOverlap node.

Edit 2: Actually I just realized you were going for Event Hit and not overlap. I have no idea how set actor location and hit would handle each other if you move one object into another object.

[=evillego6;89108]
I think the problem may be that you’re using set actor location as your means of movement. I don’t know what you’re trying to do so I can’t offer an alternative, but if I had to make an educated guess, I’d say that that is the problem. I think that overlapping is more or less reserved for dynamic, continuous movement rather than teleportation type of movement.

Edit: I have an idea - right after you use the set actor location node, try using a GetOverlappingActors node and filter it down to the class you’re looking for. Then if there is a match, do whatever you were originally going to do in the OnBeginOverlap node.

Edit 2: Actually I just realized you were going for Event Hit and not overlap. I have no idea how set actor location and hit would handle each other if you move one object into another object.
[/]

I thought about teleportation nature on SetLocation, but I cant find any other means to move actor, not a pawn or character, but a dynamic actor without physic simulation. If there are any other method - I will be very grateful for pointing me in the right direction. I just trying to move Actor forward and detect it hit other Actor.

This is all I was able to find on how to do that, but I have no experience with it myself - How can I launch a simple Actor with Velocity and Friction? - World Creation - Unreal Engine Forums

[=evillego6;89123]
This is all I was able to find on how to do that, but I have no experience with it myself - How can I launch a simple Actor with Velocity and Friction? - World Creation - Epic Developer Community Forums
[/]

Unfortunately this is for physics simulated objects only.(

In the Set Actor Location function set ‘Sweep’ to true. See if that changes anything

[=mindfane;89440]
In the Set Actor Location function set ‘Sweep’ to true. See if that changes anything
[/]

Its working, but it not enabels hit events, but stops moving when cilliding, and its stops moving forward even if its collided from side or bottom. But I need Event Hit data without forcing to stop.

We might be able to help you better if you explain what you’re trying to do. I personally would set them up as projectiles if they are just moving in a line. Or maybe vinterp to a Move Component node so it moves smoothly to your desired location.

[=Havoc;89742]
We might be able to help you better if you explain what you’re trying to do. I personally would set them up as projectiles if they are just moving in a line. Or maybe vinterp to a Move Component node so it moves smoothly to your desired location.
[/]

I want make so that when I press W key some object, not pawn or character, will move forward without physics simulation and when it toches another object ahead then EventHit will fire, but without restrictin a movement, or restricting it only in that dirrection and not all movement at all.

[=Battou;89898]
I want make so that when I press W key some object, not pawn or character, will move forward without physics simulation and when it toches another object ahead then EventHit will fire, but without restrictin a movement, or restricting it only in that dirrection and not all movement at all.
[/]

Ok looks like you need to listen to ‘Event begin Overlap’ instead of hit. I think one of the posts above suggests this. Did you try that?

[=mindfane;90084]
Ok looks like you need to listen to ‘Event begin Overlap’ instead of hit. I think one of the posts above suggests this. Did you try that?
[/]

But I need hit info such as hit point and normal.

Problem is I think ‘Hit’ is fired when actor is actually blocked. I played around today with several setup, and this is what I am seeing. Couldn’t you try to do a trace from one Actor to the Other within ‘Begin Overlap’ to get the hit normal and direction?

[=mindfane;90148]
Problem is I think ‘Hit’ is fired when actor is actually blocked. I played around today with several setup, and this is what I am seeing. Couldn’t you try to do a trace from one Actor to the Other within ‘Begin Overlap’ to get the hit normal and direction?
[/]

I can trace, but how much performance cost trace have? I thought about constant trace ahead before, but I’m afraid that it will be big performance hit.

[=Battou;90572]
I can trace, but how much performance cost trace have? I thought about constant trace ahead before, but I’m afraid that it will be big performance hit.
[/]

Thing is, you only need to do a trace when an overlap happens. So it might not be a huge hit on performance. Then again it depends on how frequent overlaps happen. Anyway just try this and see if it works. If it hits performance significantly, we can some up with something else.

[=mindfane;90757]
Thing is, you only need to do a trace when an overlap happens. So it might not be a huge hit on performance. Then again it depends on how frequent overlaps happen. Anyway just try this and see if it works. If it hits performance significantly, we can some up with something else.
[/]

It actually works. Thanks. (But still wandering why cant use EventHit) But now I stumbled another problem. I wanted to use hit normal to catculate angle between Actor forward vector and wall normal to calculate sliding collision, so Actor wont stop if wall isn’t perpendicular but slow slide along the wall. I can calculate angle, but I don’t know how to determine to witch side to slide because angle always positive. Any suggestion? Maybe there are some another way to make sliding collision?

[=Battou;90855]
It actually works. Thanks. (But still wandering why cant use EventHit) But now I stumbled another problem. I wanted to use hit normal to catculate angle between Actor forward vector and wall normal to calculate sliding collision, so Actor wont stop if wall isn’t perpendicular but slow slide along the wall. I can calculate angle, but I don’t know how to determine to witch side to slide because angle always positive. Any suggestion? Maybe there are some another way to make sliding collision?
[/]

Convert the Forward vector and Wall normal into a Rotators and calculate Delta. Check the Yaw part of the resulting rotator. It should have postive and negetive values depending on the angle difference.

[=mindfane;91020]
Convert the Forward vector and Wall normal into a Rotators and calculate Delta. Check the Yaw part of the resulting rotator. It should have postive and negetive values depending on the angle difference.
[/]

It works great in 2D (mowing in XY plane), but I’m aming on 3D space movement, and then delta calculated in world axises wich in same collision but when both actors turned for example 90 deg and looking up, will give delta in wrong axis. Any way to get that delta in some actors local space axises?