How can I get two non-physics actors to properly interact, causing one to "bounce?"

I am relatively new to Unreal, and I’ve been trying for a while now to get a “T Cell” entity I’ve blueprinted into Unreal to properly recognize a wall, before bouncing off of it akin to the old DVD screensaver. I’ve been trying quite a few methods, however all of them so far have either failed to work entirely or caused an incorrect bounce direction.

The first image is what I would like to happen. The T Cell is set to slowly “drift” towards the wall, and upon reaching it adjust its trajectory to bounce off of it. Neither are physics actors, as making either of them have physics messes up their states in several other ways.

The second and third images are both the current code I have implemented. As is, the T Cell doesn’t seem to recognize the wall at all, and simply phases through it. I suspect there is something wrong with how I am directing the raytrace, however I cannot be too sure. Any help would be appreciated!

Hmm…well, in general, if one object is passing through another, that means that the collision is set that way.

Do you have collision on both of the objects? You can tell by going into the mesh editors and seeing if they have collision. If they don’t, you can use the mesh editor to give them very basic collision if you want.

If they both have collision set, then you need to make sure they are set to “block” each other rather than overlap or ignore. To do this, you need to go to the collision section of their details panels.

Once you have them blocking each other correctly, maybe you can set up an Event Hit to make a Move Component To or maybe a Timeline move (at least one of the objects will have to be an actor to do this). I think this would work, but you might have to look up more about how to do it.

As is, both are set to “BlockAll,” which in theory should mean that they both “block” each other. I set up a Print String off of an Event Hit to check whether the collision would trigger one, and despite the fact that both are set to trigger hit events, no string was printed. The string does, however, print when the player touches the T Cell, so I know that it’s possible for the wall to do it too.

Hmm…does the wall have collision in the mesh editor? It can be set to block everything in the universe, and it still won’t block if it doesn’t have anything to block with.

Currently the wall itself is actually just the basic cube mesh, only modified in size. I believe the basic cube by default has collision, but is there a possibility it doesn’t have the collision I’m looking for?

No, you are right, the base cube mesh should already have collision. The wall should be able to block most basic things then.

Hmm…
The wall isn’t a component of the same actor as the other object right? They are both separate actors?

Maybe try shooting something else at the wall? Then at least you will know the wall is the issue.

I think I’m stumped here too though. :frowning:

I put the same EventHit string output on the “bullet” entity that the T Cells shoot out, which failed to create any strings, even when interacting with the player. However, that same entity has worked perfectly well with an “OnCollision” function instead, which tells me that a collision event would be the best way to go through with this.
The current method I have in place does use an “OnCollision” method to begin the process, before then tracing a ray.