Announcement

Collapse
No announcement yet.

Controllers: When -not- to use them?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Controllers: When -not- to use them?

    So, most of us know by now that for default Pawn/Player behavior, you need to have either an AIController or a PlayerController attached to them. When I was digging through the FPS tutorial, I noticed that in the projectile code, it spawns an actor, attached a MovementComponent and CollisionComponent, and let it go on it's merry way. The controller specified was only to keep record of the source of the projectile, but did not direct it's movement. (I tested this by removing the controller from it altogether. Still moved.)

    My question then for people who have tested this a bit more, when do you -actually- need a controller? Or more precisely, outside of accepting input, what does it do? Does it set a pawn's movement component to itself and update it, or does it manually generate a new movement and physics component for the pawn itself and mess with it? If you take a pawn and apply your own movement/collision/physics component, can you have a basic pawn that moves around but can't accept input of any sort from the world?
Working...
X