Spawned Interactable Components are broken since 39.00

Summary

Preplaced entities with interactable components work fine but if you spawn an entity with an interactable component then it doesn’t fire any of the events (Succeeded event but I also tested Started)

Please select what you are reporting on:

Verse

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

Make a prefab with an interact component
Place one in the level
Spawn one when the game is started

Expected Result

Both fire the “Success” print

Observed Result

The spawned prefab doesn’t fire the Success print

Platform(s)

All

Upload an image


Video

Additional Notes

The 3 cubes you can see are preplaced prefabs - you can see the “Success” print in the top left corner

I spawn in the prefabs from the trigger - the Success doesn’t print

Verified broken in my projects as well and also in a quick test project. Prefabs added in outliner seem to work, any Entity created at run time does not.

3 Likes

Also is happening in my project, weirdly enough SOMETIMES if I spam the interact button a ton of times it eventually will fire once. Also it appears to only work with some meshes so I assume the mesh’s collision matters

2 Likes

Also broken in my project after V39 update. I am spawning the entity in with a intractable component and it never fires.

3 Likes

Mine seem to still be working perfectly fine after 39.0.0. Was investigating with Trick, and we seem to be led to believing that attaching it to the SimEntity directly is now whats causing issues. I personally attach my components to a different entity that is already existing and attached in the Simulation, and have 0 issues post 39.0.0. Still trying to narrow down specifics for replication, but this is what we’ve managed to find so far.

3 Likes

Worth saying that i’ve tried attaching to a different entity in scene but it doesn’t work for me but does for Sensei so who knows haha!

5 Likes

I’ve been trying to find a workaround all afternoon because this bug completely breaks a game I’m working on. I’ve found that some meshes sort of work, they never register the first time, but if you hit the right spot or angle after around a hundred attempts, they eventually respond. Once a mesh does accept an interaction, that specific instance can then be interacted with normally from that point on. I’ve also found that other instances of the same mesh asset start working as well once a single instance has successfully registered an interaction.

2 Likes

Also having the same issue

3 Likes

very jank work around is I used Scene Graph ray cast object collision with players lookat if it’s a entities with interactable_component I register a Input Trigger for Interact and then call the interactable_component Succeed … this was the simplest solution I’ve found until Epic fixes the issue. Tried using Prefabs in the outliner and ran into a bunch of issues registering buttons, meshes, and general inconsistencies. Hopefully Epic fixes quickly.

2 Likes

Im having the same issue in my projects. It completely breaks my game.

2 Likes

I found the root cause of the problem: instead of inheriting interactable_component, I had to retrieve it from another component. But doing it this way means we lose control over filtering which agents can interact with the entity, and we also lose the ability to customize the interaction text.

Working component

working_component<public> := class<final_super>(component):
    OnSimulate<override>()<suspends>:void=
        if(Component := Entity.GetComponent[interactable_component]):
            loop:
                Agent := Component.SucceededEvent.Await()
                Print("Clicked by Agent")

Broken component

broken_component<public> := class(interactable_component):
    OnSimulate<override>()<suspends>:void=
        loop:
            Agent := SucceededEvent.Await()
            Print("Clicked by Agent")

This doesn’t fix the issue for me unfortunately

1 Like

This is probs why when you inherit the interactable comp you cannot Enable() after it starts as Disabled in the editor

1 Like

FORT-1025748 has been added to our ‘To Do’ list. Someone’s been assigned this task.