Announcement

Collapse
No announcement yet.

Where do I place the spawning of pawns?

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

    Where do I place the spawning of pawns?

    I am working in a Duck Hunt game, where the user only controlls the Yaw rotation of the shotgun.

    I'm now working on the Duck spawning. Up until now, I've placed all the logic to control the Shotgun rotation inside of my custom PlayerController blueprint.

    However I don't feel like this is the correct spot to program the Spawning logic of the ducks. I guess this should be placed inside of my custom GameMode Blueprint.

    If this is true, how do I communicate between my custom PlayerController BP and the my custom GameMode BP?

    ​Maybe it's easier than what it seems, but I'm just starting out. I'm also looking to adhere to best practices from the beginning... You know, old bad habits are difficult to drop, I better start doing things the right way from now.

    #2
    Another question. The player obviously doesn't control the movement of the Ducks. However they are fully animated, 3D moving characters. Do I need to make them pawns? Characters? Or actors?

    Comment


      #3
      You can communicate with Gamemode with GetGameMode -> Cast to "YourCustomGameMode" and from there you can implement your logic there.
      About movement it depends what you need and whether it is a multiplayer game?
      If you want to implement custom movement (and do not think too much about replication) you can use Pawn or Actors. Easiest way is to use Characters because they already have prebuild movement component, lot's of settings, like movement speed, fly, swim, gravity etc. and it's easy to replicate.

      Comment

      Working...
      X