I’m trying to move an actor that isn’t connected to the player controller, I’m not sure what I’m doing wrong here’s my code:
I think my main issue is that I’m using <this> on a non playerController actor but I’m not sure how else I’d get the actor into the input stack, I’ve got the input set up on the project settings as right click triggering Move1. Should I instead have the bind set up with the rest of them in the main possessed pawn and get it to send a signal to this actor or should I stick to this? I’ve checked online for a while but I cant find anything relating to non playerController set ups so I think thats whats getting me stuck.
thanks for responding!
no, I’ve never seen this before, all my research was based around “taking input” rather than setting up binds so i guess that’s why,
From looking at this, being completely honest I don’t understand it much but i think i get his issue is that he was calling EnableInput and it was getting cleared early because he was calling it at the wrong time so he fixed it by calling it after he’d set up the InputComponents, I’ve tried this and I’m still getting errors, i’m wondering if this is outdated? Also he uses PCowner which I don’t know if I can use for my situation, I’m not really sure
Looking at the code for the default 3rd person character they don’t use EnableInput at all in any of their code is there a newer way of doing this that I should look into?
Okay, looking through an old post where a unreal engine developer talks about the player controller, they say you can only have one player controller control one pawn at a time, so i guess my options are:
-take input without a player controller
-make another controller and make them both work simultaneously
are either of these possible?
Here’s the post I found for future people that might wonder on this
Taking input without a player controller would certainly help you. A raw input generated by the system itself and which follows the constraints set on it.
Have you tried it?
- have ptr to “other object current being controlled” in player controller (looks like you have that)
- in the player controller input handlers redirect the input when necessary
I’ve done this on a few projects. Another nice thing you can do is make an interface for controlled objects. That way any object that the player can control with input handles MoveLeft() or MoveUp() or whatever …
would you suggest doing that just like you normally would in c++?
oh nice, i’ll try it