so im trying to have doors open up whenever I press the E key. I have two classes, a class for the door (which has the function to open it) and I have a player class which I have the input component attached to.
Now inorder to bind keys to functions I would use the BindAction function where the last parameter ur supposed to put a reference to the function to be called. the thing is the function is in the door class, so I tried to make an instance of that class in the player class and call It from there but I keep getting “& requires l-value” error.
I don’t know what to do. I could attach the input component in the door class but because the player class will also do other stuff that needs the input component i don’t want to repeat what i don’t have to