What is the standard way of detect additional player input inside a ability?

ttesjt

New member
Hi!

I have an ability called "jump catch". it has two part where first part is jumping, and second part is catching the object that is above the player. What I want is when player press "jump", it jumps, but only catch when player press "Fire1" at a certain height range. So I have the question. what is the proper way of detecting inputs? Abilities are in fixedupdate, and I am afraid input detection in fixedupdate loop can be skipped.


Another quick additional question is, what is the standard way to move player to a position in an ability? Like when I start an ability, sometime player is not standing at the perfect position. I want to move player to the right standard position first. What is the standard way to do it?

Thank you!
 
Last edited:
You can use the ActiveInputEvent. Take a look at the jump ability for an example of it:

Code:
m_AirborneJumpInput.Initialize(ActiveInputEvent.Type.ButtonDown, InputNames[InputIndex], "OnJumpAbilityAirborneJump");

Another quick additional question is, what is the standard way to move player to a position in an ability? Like when I start an ability, sometime player is standing at the perfect position. I want to move player to the right standard position first. What is the standard way to do it?
You can use the DesiredMovement parameter within UpdatePosition to move.
 
Top