get player pawn

Solutions on MaxInterview for get player pawn by the best coders in the world

showing results for - "get player pawn"
Diego
22 Jul 2017
1//file to include
2#include "Kismet/GameplayStatics.h"
3
4//Syntax
5static APawn * GetPlayerPawn(const UObject * WorldContextObject, int32 PlayerIndex);
6
7//ExampleCode
8APawn* PlayerPawn = UGameplayStatics::GetPlayerPawn(GetWorld(), 0);
9//								this is a reference to world  | This is the index of player which you want. In this case  have written 0 that means the first player
10//For more information vist https://docs.unrealengine.com/en-US/API/Runtime/Engine/Kismet/UGameplayStatics/GetPlayerPawn/index.html											
similar questions
queries leading to this page
get player pawn