Controlling a main actor and a sub actor by two player controller
I currently have a "main" actor (a car) which has a sub actor (a turret). I want to let two player control the vehicle. One controls the vehicle (drives around). One controls the turret (can rotate the turret and shoot). i tried to possess the car with one player controller and the child actor with a second player controller, but the child actor just detaches from the car. i guess one actor (and its sub actors) can only be controlled by one controller. i guess one solution would be to teleport the turret to the car (every few ticks or so). but i imagine that could create massive lags and network traffic. another solution i could think of is to attach the car and the turret seperatly onto a "super actor". but i havent tried that yet. is there a better way to do this? will the lag/traffic be a problem?
asked Aug 15 '16 at 08:18 PM in Blueprint Scripting
For something like this, the best way to do it would be to create two separate pawns, have the first pawn controlled by the first player, the second by the second. The second pawn must be attached to the first, which you can do with "Attach Actor to Actor":
This should allow the second actor to maintain its position above the first pawn's position.
answered Aug 15 '16 at 08:26 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here