WTF Is? Get Input Key State in Unreal Engine 4 ( UE4 )

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ต.ค. 2024
  • What are the Get Input Key State Nodes in Unreal Engine 4
    Source Files: github.com/MWa...

ความคิดเห็น • 4

  • @xenxennon6549
    @xenxennon6549 8 ปีที่แล้ว

    Would this be an efficient way to say use a specific key like you might use shift/ctrl/alt? For example, say I want to bring up a menu of clickable choices while holding down the "TAB" key (and suspend normal gameplay mode) then upon releasing the key, the menu will vanish and gameplay would revert to normal. The key word here is "efficient" - is this expensive in terms of performance? I'm guessing not.

    • @MathewWadsteinTutorials
      @MathewWadsteinTutorials  8 ปีที่แล้ว

      If you are just trying to do a toggle like you are suggesting then a normal Input should work fine. You would use an Action Mapping for the TAB key and you get a pressed and released event to use.
      This node is more for an alternate way of getting Input if you cannot use the default UE4 Input system. Both ways are roughly the same in terms of performance and are normally checked on each frame.

    • @xenxennon6549
      @xenxennon6549 8 ปีที่แล้ว

      Can you describe a situation where the approach used in the video might be preferable to using simple action-mapping since to me they seem to do much the same thing.

    • @MathewWadsteinTutorials
      @MathewWadsteinTutorials  8 ปีที่แล้ว

      A use for this might be if you want to make your own input key manager in pure blueprints to allow your player to change their keys in your game for example. Alternately you might want to have an action input that is Fire and then you can check for input key states when it is pressed to see if maybe the ALT key is down or CTRL without having to have a separate mapping just for that.