Movement Component / Acceleration

Hi! I’m trying to re-make something I made in the UDK as a test case for getting into UE4 programming. Basically it’s a custom movement/physics implementation. I’m looking around the Movement Component/Actor stuff in the API docs (and on here) to find out how to get/set the acceleration of an actor. I see that the CharacterMovementComponent has a value for acceleration, but none of the parent classes do.

In UDK I used the actor location, velocity and acceleration to implement my custom movement/physics (which also happened to be a convenient way to share said properties with other classes.) Would I need to implement my own ActorComponent/MovementComponent subclass with all the properties I need (mostly just accel) or have I missed something?


P.S.: This is in C++, not in a Blueprint.

Hi Matt,

Yes, that’s correct, Acceleration isn’t part of the base MovementComponent class, so you’d have to add it to your own implementation if needed.

DefaultPawnMovement is a simple example of a movement component derived off PawnMovementComponent, and exposes Acceleration, Deceleration, and MaxSpeed. It implements simple movement that applies the control input vector to movement, and slides along surfaces upon impact. It may be a good starting point, but it also isn’t too tough to implement your own movement if you like.

Okay. Thanks for the tip!

I need to implement my own movement class in this case because we use quite advanced orbital mechanics. Something not really covered by the standard classes :stuck_out_tongue: