# How does CharacterMovementComponent::PerformMovement work?

I'm developing an adventure platformer. As such, the manipulation etc. of the CharacterMovementComponent is going to be crucial to the game.

I have seen the more top level explanations of the MovementComponent however none of them provide any insight into how PerformMovement is coded.

I'm trying to work through it and understand it myself, however as i'm not completely familiar with the component, it's a little hard for me to understand.

So I was wondering if anyone on here knew anything about this MovementComponent, could tell me how the function really works, or could point me in the right direction for the development of our movement systems.

• What aspect of "how it works" are you interested in / confused by? Are you just looking for a line-by-line explanation of the code? What is the problem you are trying to solve or movement style you are trying to achieve here? – user1430 Oct 16 at 16:50
• @Josh I'm looking for a line-by-line ish explanation of the code. I'm trying to develop a grappling hook, and a custom movement mode is going to be vital. I want to gain a better understanding of how Epic implemented the PerformMovement method so I can understand how to better develop my own system – Natalo77 Oct 17 at 8:38
• Any reason you don’t just ask about implementing the movement of a character with a grappling hook directly? Most of what PerformMovement does may be entirely irrelevant to that problem space. – user1430 Oct 17 at 13:08
• Epic implemented performmovement several times in CMC each is entirely different - 2 of the most interesting (atleast for me )are PhysMovement and NavMovement - PhysMovement is implementing by performing many many many traces and based on the results implements the movement. The 2nd one - I have to note that it never worked well for non flat ground is using the underlying NavMesh polys and based on them makes the decisions - it will have all kind of heights problems - but It has significantly better performance (iirc it also doesnt simulatecollisions and physics). – ColdSteel Oct 17 at 18:02
• @ColdSteel So I notice: I've been working through and taking notes - going down the rabbit hole that is the PerformMovement function. I'm gaining an understanding of it. I may post the results here when I've finished my research – Natalo77 Oct 18 at 8:03