写多人游戏(联机)的时候, 要在 DefaultEngine.ini
中定义 :
LAN
[OnlineSubsystem]
DefaultPlatformService=Null
Steam
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
[OnlineSubsystem]
DefaultPlatformService=Steam
[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
bVACEnabled=0
[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
设置第三人称Character Blueprint的几点注意
1.添加Spring Arm Component后Attach摄像机, 并勾选Use Pawn Control Rotation
2.取消勾选Pawn下的Use Controller Rotation Yaw
3.勾选CharacterMovementComponent中Rotation Settings下的Orient Rotation to Movement