Announcement

Collapse
No announcement yet.

Simple pawn input controller not working

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

  • started a topic Simple pawn input controller not working

    Simple pawn input controller not working

    Hi all, I'm new to UE4 and was trying to control a pawn from player input.

    What I did are:
    1) created a blank project
    2) created a blueprint class inherited from pawn, added a static mesh to represent the pawn object
    3) in event graph, added enable input after 'event begin play' and connected with 'get player controller'
    4) added key event 'J' and connected it with 'add actor local rotation' to make my pawn rotate when I press J

    However, it doesn't work as I expected, nothing happened when J key is pressed. I'm not totally clear about playercontroller but I guess this simple task can still be achieved by just using the pawn itself?

    Any suggestions will help. Thanks a lot.

  • replied
    Hi , i still reading the docs and following tutorials but here it is..

    Input can be enabled on Actors, not on Pawn , Pawn need to be possessed .

    So , you can use an Actor , with enable input
    Or , you can use a Pawn , with Possess (screenshot of blueprint in my Pawn)
    Docs link to possess (https://docs.unrealengine.com/latest...nts/index.html)

    Dont try to enable multiple input or possess more than one pawn.
    In both cases you can communicate with just one thing for controller.

    I suggest you to check the flow using print text everywhere.
    so you can say if the event dont fire or the blueprint dont do what you want .Click image for larger version

Name:	Possess.png
Views:	1
Size:	82.1 KB
ID:	1079282

    Leave a comment:

Working...
X