Nudging characters - a pixel movement solution

When using pixel based movement there are times you'll want the player character to align with the grid for specific moments such as a cutscene. I've found that making a character jump on the spot accomplishes this. I'm seeking a more elegant solution to this issue which 'nudges' the character onto the grid without the jump. Any suggestions? Thanks.
This works in Altimit
JavaScript:
$gamePlayer.setPosition(Math.round($gamePlayer.x), Math.round($gamePlayer.y))
This works in Altimit
JavaScript:
$gamePlayer.setPosition(Math.round($gamePlayer.x), Math.round($gamePlayer.y))
Thanks. This works the same as transfer player (to the same map) which snaps the character to the grid. I was seeking a solution that looks less jarring by nudging or sliding the character into alignment. The camera also stays where it is, creating additional problems.
Thanks. This works the same as transfer player (to the same map) which snaps the character to the grid. I was seeking a solution that looks less jarring by nudging or sliding the character into alignment. The camera also stays where it is, creating additional problems.
Then change setPosition to the move event/step toward/whatever function of your choice.
Then change setPosition to the move event/step toward/whatever function of your choice.
Sorry, I don't understand :aswt2:
Can you elaborate?
Sorry, I don't understand :aswt2:
Can you elaborate?
I don't know what pixel movement or other plugins you are using but there are dozens of "move an event" to an x,y coordinate functions provided by different plugins.
I don't know what pixel movement or other plugins you are using but there are dozens of "move an event" to an x,y coordinate functions provided by different plugins.
Okay. I'll look for a new plugin. I'm currently using OcRam's movement which doesn't list this function in its script calls. Thank you for the guidance.

EDIT: Luna_QPathfind seems to be the most elegant solution I've found.

Original thread: https://forums.rpgmakerweb.com/threads/nudging-characters-a-pixel-movement-solution.165632/