I am creating a utility game where I have targets auto spawn in random locations throuhgout my map. I need to test when auto spawned to ensure they are not being spawned in the game world, nor in the character itself. If they are, I elimate them, and respawn.
I am at a loss on how I do this. The game world will be static meshes I created in Maya, and the targets is a model I created in Maya, and a sphere in the target blueprint for it to “hit” or “overlap” as my other target assets had an animated neutral animation.
My target is a blueprint. It is interacting with my game world. How can I test this? (I can do the detroy actor, respawning, but I am not getting the overlaped state to “start”, or “fire”.
This is what I have right now, you can see where it is partially overlapping. This white shape is my target, the model with the UV checker is my world.
This code does nothing. Why isn’t it firing?
I have “generate overlap events” on in the details panel.
Finally, on the UV checker polygon I do have “generate overlap events” checked.
Help! Why isn’t this working, or doing anything at all!
I don’t know why it isn’t firing, since both entities have generate overlap events. However my other idea would be to try line trace for objects node, or sphere trace for objects. Raycasting is cheap and can help you achieve the same thing.
Hi Zireael07 - can you tell me a little more about raycasting? I believe I can wrap my mind around raycasts because they are linear, and would be usefull when things are shooting. How would I use a raycast to test for 3 dimensional overlap?
I also believe that I found the reason why the overlap events were not firing. I placed the initial target manually, and then started the game - and it didn’t work. If I setup a quick keybind so that each time I pressed it the target MOVED, even slightly, it would fire the overlap event. Does that make sense to people? That overlap events only fire after the game is going and overlaps occur, and will NOT fire when the game starts be default? That is what is happening for me right now.
Overlaps only fire while the game is going. If the stuff starts game already overlapping, it won’t fire.
As for raycasting, here’s everything you need to know: https://docs.unrealengine.com/latest/INT/Gameplay/HowTo/UseRaycasts/Blueprints/
Try a box trace for objects or a sphere trace for objects.
Not sure because I haven’t messed with overlaps in a while, but does the node ‘get overlapping actors’ on the spawning actor’s begin play work in this case?