1
\$\begingroup\$

As the title may suggest, I'm developing a CustomMovementComponent and I'm on the stage where I am developing my own PhysCustom function.

As such, I am trying to copy the style of Epic's development for these functions.

One thing that has bewildered me thus far is how these functions : PhysWalking, PhysFalling etc actually handle input.

I understand that they work based on time steps but where in these functions is the input actually taken into account?

Thanks

\$\endgroup\$
1
\$\begingroup\$

I'm going to answer my own question here, since I figured it out.

A Player's input is passed into AddMovementInput, which then affects ControlInputVector.

A MovementComponent then queries this ControlInputVector using GetPendingInputVector. It then uses the result of this to update/affect Acceleration.

The various Phys functions within MovementComponent will then query Acceleration (Henceforth known and used as input), to affect Veclocity, which is ticked and used to update the position of the UpdatedComponent for the player pawn.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.