<track id="5sipw"><track id="5sipw"><span id="5sipw"></span></track></track><delect id="5sipw"></delect>

<meter id="5sipw"></meter>

  • <meter id="5sipw"><ins id="5sipw"><strike id="5sipw"></strike></ins></meter><nobr id="5sipw"><input id="5sipw"><ruby id="5sipw"></ruby></input></nobr>

      1. <cite id="5sipw"></cite>


          The Pawn is the physical representation of a player within the world.



          The Pawn class is the base class of all Actors that can be controlled by players or AI. A Pawn is the physical representation of a player or AI entity within the world. This not only means that the Pawn determines what the player or AI entity looks like visually, but also how it interacts with the world in terms of collisions and other physical

          1. This can be confusing in certain circumstances as some types of games may not have a visible player mesh or avatar within the game. Regardless, the Pawn still represents the physical location, rotation, etc. of a player or entity within the game. A Character is a special type of Pawn that has the ability to walk around.

          By default, there is a one-to-one relationship between Controllers and Pawns; meaning, each Controller controls only one Pawn at any given time. Also, Pawns spawned during gameplay are not automatically possessed by a Controller.

          In Blueprints, the best way to add movement to your Pawn-derived class is with SetActorLocation. With SetActorLocation, you can decide if you want to teleport to the location, or sweep. When sweeping, your Pawn will move along the direction and stop if it hits something.

          Default Pawn

          While the Pawn class provides only the essentials for creating a physical representation of a player or AI entity in the world, the DefaultPawn subclass comes with some additional Components and functionality.

          The DefaultPawn class contains a native DefaultPawnMovementComponent, a spherical CollisionComponent, and a StaticMeshComponent. To control the DefaultPawnMovementComponent, as well as the camera, a Boolean to add default movement bindings is also present in the DefaultPawn class, and is set to true by default.


          The movement style set for the DefaultPawnMovementComponent is a no-gravity, flying style. In addition to the usual MovementComponent variables, it includes MaxSpeed, Acceleration, and Deceleration float values. These three variables are also accessible in DefaultPawn-derived Blueprints.

          Spectator Pawn

          The SpectatorPawn class is a subclass of DefaultPawn. Through a GameMode , different classes can be specified as defaults for Pawn and SpectatorPawn, and this class provides a simple framework ideal for spectating functionality. Like DefaultPawn, it has a spherical CollisionComponent, although the StaticMeshComponent is not created due to the implementation of .DoNotCreateDefaultSubobject(Super::MeshComponentName). The movement for the SpectatorPawn class is handled in the SpectatorPawnMovementComponent; the no-gravity flying behavior is the same as in the DefaultPawnMovementComponent, with added code for handling or ignoring time dilation as necessary.

          Select Skin

          Welcome to the new Unreal Engine 4 Documentation site!

          We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

          We'll be sure to let you know when the new system is up and running.

          Post Feedback