Unreal引擎 切换 / 按住冲刺问题

huangapple go评论41阅读模式
英文:

Unreal Enginge Toggle / Hold to sprint problem

问题

我是新手使用虚幻引擎和制作游戏。我需要帮助解决这个问题,我似乎无法自己解决它。如何使得按住Shift来进行冲刺,而不是Shift切换冲刺?

Unreal引擎 切换 / 按住冲刺问题

我尝试了一些实验,但最终只是出现了错误。似乎在谷歌上也找不到解决方案。

英文:

I am new to unreal engine and game-making overall. I need help with this issue I can't seem to fix it myself. How do I make it so that I hold shift to sprint instead of shift toggling sprint?

Unreal引擎 切换 / 按住冲刺问题

I've tried experimenting but I only end up with errors. Can't seem to find a solution by googling.

答案1

得分: 1

当Shift键被按下时,将“Running”标志设置为true,并更新速度以反映玩家正在奔跑;当Shift键释放时,将其设置为false(并相应降低玩家速度)是最简单的方法。

英文:

The easiest way would be to use both the Pressed and Released events: when shift is pressed, set the Running flag to true and update the speed to reflect that the player is running, and when the shift key is Released just set it to false (and lower the player speed accordingly)

huangapple
  • 本文由 发表于 2023年4月11日 14:06:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/75982829.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定