How can you achieve classic RTS movement?

Hi!

How can you configure the UCharacterMovementComponent to never move sideways and/or strafe. If the character should move sideways it should first rotate and then move. Is this possible to configure by default or do I need to modify the component? I want to achieve classic RTS movement behavior.

Hi ,

Have you looked at the movement in the top-down template? This is similar to what you described and, if it doesn’t meet your needs, it will give you a good starting point.

I have pretty much based my solution upon the top-down template. The problem is that when units rotate slow but move at “normal” speed, they are rotating while they are moving instead of rotating and then move.

Hi ,

I have not dug too deeply into the pathfinding movement code, but it should be possible to alter the movement so that rotation begins towards the destination, then movement only occurs if the angular difference between the unit’s rotation and the destination is at or below a certain value. This will require some additional code (or Blueprint editing if you are using Blueprints), though.

Sorry for the delay. I think found a configuration that’s good enough for now. Thanks for the help!