- Writing a new input driver to handle click-to-move mechanics.
- Rewriting custom AI controllers to use the new character controller.
- I debated having a fixed 3/4 view (traditional) but also wanted to experiment
with the ability to rotate the camera.
- Similarly, I debated the ability to control a slight pitch of the camera.
Generally, cleaning up jitter in motion can be resolved by adding a minor amount of lag in the camera, to smoothly follow the character rather than latching to their position. In an ARPG, however, this drift can have significant gameplay implications (what and how much you can see on the screen).
In both modes, significant jitter can be observed as well.
- Smoothing to walk transitions based on distance to path completion.
- This took adjusting (and adding) couple of additional knobs:
- Camera follow smoothness
- Camera maximum distance
- Animation transition thresholds (what percentage of motion equated to which animations)
- Animation transition smoothing (how quickly we modulated the transition of the animation)
- Character movement smoothing (how quickly the character actually moved)
- This required adding additional knowledge about the current path segemnt travelled
as well as the progress within the overall path (distance to completion).
- Originally I attempted to just smooth based on distance to current waypoint, but it fell apart due to multi-segment paths (you don't want the character to slow down just because they reach a midpoint waypoint)
- You can see how much nicer it looks when you modulate speed to match the animation transition as well, with a very subtle camera follow.
While this makes for reasonable visuals, it impacts gameplay significantly. As you approach your goal destination, you don't want the character to have a significant drop in speed. If you make the transition period too long, they end up not being able to chase as well (constantly slowing down before entering interaction range). If you make it too short, the jitter returns.
In addition to a maximum speed, you also need a knob to control minimum speed. This speed needs to also be tuned against the animation speed to prevent awkward sliding.
Adding a little animation helps cover up the remaining jitter.
I'd have preferred a more subtle animation but beggers can't be choosers, it's the one I had onhand.
Lastly, cleanup animation interrupt states.