Get the mulitplayerP:
Open Playerbase BP, add variable:
Create 2 child parent base BP, called Player 1 and 2 BP
Open player 2, set play index to 1 (player 1 is 0)
Go to 3rd person game mode BP, change default pawn class to player 1:
To spawn the Player 2:
Change the mesh of player 2 to mannequin
In 3rd person gamemode BP, make custom event
Open Level BP in current map (3rd person Map):
Now split horziontal screen in game mode once pressing P
To change to vertical/grid split, go to project setting:
tick Skip assiging gamepad to player 1 (to let gamepad controller player 2, or else both keyboard and gamepad just control player 1)
Back to PlayerBsae BP, add custom events
In 3rdperson Game mode BP, add follow nodes:
To set only 2 number of splitted screen, by using destroy player:
(now can add up to 4 if pressing P 4 times. Aim to hit P is only swift between 1 and 2 players)
In 3rd person game mode, add custom event:
In 3rd person Map (if want to change back to up to 4 players by hitting P, connect P node directly to bottom Cast to BP thirdperson game mode node, skip the branch:
In PlayerBase BP:
Optional: If player 1 and 2 start in the position to close to each other:
In player base BP, both Mesh, and capsule components:
Collison preset: Custom, tick ignore Camera
To fix character jumping anim:
Go to the character ABP:
Add follow from sequence 1 (promote variable boolean from Is Falling node)
In Case state graph, drag fall loop anim in graph and connect as:
P.S the Manny anim not work on my character, so I import the falling idle anim,
and tick force root lock in Root motion, if the anim imported not in a correction rotation: