Difference between actor and pawn

https://docs.unrealengine.com/latest/INT/Gameplay/Framework/index.html

Hope this help.

Ockert

Hello.

Im a former unity developer who rencently ported to unreal 4. Im therefore having a hard time grasping what the different things do and dont. One thing i dont understand is the difference between actors and pawns. To me it seems that actors server the same purpouse as gameObjects do in unity. But i dont know what the pawns do. Could anyone give me some concrete info on what they do and dont?

Thank you.

Extra note. If anyone could tell me what characters do too i would be very grateful

Unfortunately didnt really. A lot of these words dont make sence to me. Im not a very experienced dev and im not native english speaking so most of this just goes over my head. Thanks for replying though.

Actors: “Actor is the base class for an Object that can be placed or spawned in a level. Actors may contain a collection of ActorComponents, which can be used to control how actors move, how they are rendered, etc. The other main function of an Actor is the replication of properties and function calls across the network during play.”

Pawn: https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Pawn/index.html

“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 interactions. 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.”

Character:
https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Pawn/Character/index.html

“With the addition of a CharacterMovementComponent, a CapsuleComponent, and a Skeletal Mesh, the Pawn class is extended into the highly-featured Character class. A Character is designed for a vertically-oriented player representation that can walk, run, jump, fly, and swim through the world. This class also contains implementations of basic networking and input models.”

3 Likes

My entire problem is that i dont understand how all this is handled since i always just go from my unity experience. And a lot of this doesnt make any sense. What i dont get is what the concrete differences are. Its stuff like “actors cant be moved by scripts and pawns can” this is what im looking for. Citing the official documentation doesnt really help since anyone who posted a question here is very likely to already have checket it. Sorry. Thanks for helping though.

I also dont get how unreal handles players since ive always been used to writing a script that makes an object with an attached camera move and rotate depending on input. Not all these fancy things that unreal introduce.

Hi Indiana ,
Epic , the developers of Unreal Engine 4 are game developers them self and so , the Game Development Process in Unreal Engine 4 is really well thought out.

Simple Examples:

Actor:Lets say you have a “Door” mesh(3D Model) you want it to be placed around the level , with the ability to be opened or closed
by the player.You would create an Actor Class “Door”

Pawn:Is the recommended Class for a “Playable Actor” , controlled by the Player or AI.

Character:Is a more advanced form of a Pawn Class.“A Character is designed for a vertically-oriented player representation that can walk, run, jump, fly, and swim through the world”.

So it is possible to make a Playable Character from the Actor class , but to implement all the basics needed for a Character is going to be hard work, and thanks to the team at Epic, Unreal Engine has a Character Class with all the basics of a Playable Character already implemented for the developer.

Look through the Content Examples.

You’ll get it eventually.Dont give up.

Ockert

3 Likes

Thanks. Though what i still dont get is what are the differences between pawns and actors. They must be able to do some different things and i dont get what these are. From what ive heard they do the exact same thing. Just with different names.

Yes but what are all these functions? Are they movement and such or are they just the foundation for it?

Thanks! Quite a big help. Thanks a lot mate!

Although the comments explain this (eventually), the accepted answer just links to the documentation, totally unhelpfully. The final explanation is simplest:

  • An Actor is the equivalent of a unity GameObject; ie. Anything in the game state.
  • Pawn extends Actor and is basically a ‘Player Chatacter’. Unity does not have this concept.
  • Character extends Pawn for a specific FPS human style Pawn with specific inbuilt behaviour.

Pawns

The key tangible difference to understand is that in UE4, all input and camera interaction is done via the ‘Controller’ associated with a player. This represents (basically) a single person sitting in front of a device using the game; in a multiplayer game you will have multiple players each with their own Controller.

Each Pawn is an Actor associated with a specific controller; it is the representation of that specific player in the game; as I said before, unity does not have this concept, and requires to you build this abstraction (if you want it) on top of the raw GameObject in unity.

There are also ‘Spectator Pawns’, which, obviously are people watching, but not interacting with the game. This is another built in function in UE4 not found in unity.

Characters

Characters extend Pawn in a specific way; you don’t have to use them if you want to roll your own custom functionality, but they provide some specific built in behaviour.

At a technical level, Characters are Pawns with an associated SkeletalMeshComponent, for complex animations. It also has the CharacterMovementComponent, which, critically cannot be added to Pawns.

Long story short, there’s a specific workflow which has been implemented for getting characters into the game, detailed here: https://docs.unrealengine.com/latest/INT/Engine/Animation/CharacterSetupOverview/index.html

If you want to use it, you have to use a Character instead of a Pawn.

9 Likes

Now that is some helpful stuff. Thanks a lot!

thanks a lot bro

in a word, if you need swimming, walking and flying(which related to gravity) game feature. you would better start from chracter
If you only need a observer, AI, or sth like that in your game, you can start from pawn