Creating game actor classes
The term game actor classes refers to the AActor
, APawn
, and ACharacter
classes. These three classes are used to instantiate game actors that will be placed in the game levels, as follows:
AActor
is the base class for creating a wide range of objects, such as buildings, spawn points, portals, vehicles, characters, and so on. We will extend this class to createADefenseTower
,AWeapon
, andAProjectile
classes.APawn
is a subclass ofAActor
that is used to create non-character, player-controllable actors (not characters) that accept and react to player inputs—racing cars, for example.ACharacter
extends theAPawn
class for creating characters. A character can not only accept user inputs and moves but also has at least one skeletal mesh and the character state animations, such as idle, walk, run, attack, die, and so on. We will extend this class to create a newAPlayerAvatar
class.
Let’s practice creating the three important...