UE3 - UDK How do I get a reference to my game's pawn?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Wormbo

Administrator
Staff member
Jun 4, 2001
5,913
36
48
Germany
www.koehler-homepage.de
Controller (which PlayerController extends from) has the Pawn property, which references that Controller's Pawn, if it has one. Assuming that piece of code is in your Controller class, it should give you a reference to your MyPawn if that is currently the Controller's Pawn.
 

Nathaniel3W

Member
Nov 11, 2012
48
0
6
For some reason I thought that MyPawn() was something built into UT. I just switched out "MyPawn" for the class that defines the pawn that I'm working with in my game and it's working now. Thanks again Wormbo.