My input is only working for 1 actor at a time. I disabled consume input but it still does not work. Anyone have any clue why?
Regular actors should not handle input. You can disable input consumption but it’s a bad idea, generally speaking. Input belongs in the Player Pawn / Controller.
The E to interact
should be in the Character and should probably be an interface message. I’d look into that.
I think that’s the problem. “Orange” is set to the first orange only and is not being set to the other oranges. How are you setting that reference?
Get All returns an orange - the first it finds, not the one you’re looking at / is close. If this is supposed to work by proximity, the player should have an overlapping sphere and query the oranges it envelops.
But now you’d need to cast or filter. That’s why interfaces I originally suggested would work so much better here. If you only ever need oranges and nothing else, the above would be fine as is.
How would i set up a interact interface? All i want is for when the player steps in the box collision, and presses E the oranges disappear. All i need is oranges in this project but i cant get anything to work.
There are many ways to handle it; here’s the most straightforward one that comes to mind:
- this is the
Orange
blueprint actor, it has a mesh and a sphere overlap:
- those oranges are in the scene (I unhid the sphere collision so we can see them better):
- the player can check what type of actor they overlap with when they press a key:
- resulting in:
And if you wanted the oranges to show informative text:
There’s probably a dozen ways this can be set up.
Thank you so much for your help, It finally Works!