How to setup simple X and Y vector math to chase player on grid?

Let’s say I have a cube that rotates 100 units on the Y and X axis only, positive or negative of course. The cube flips rotation based off the direction it goes to simulate a flipping box type of movement on the ground so Z is locked. I used timelines to generate the movement so it flipped 90 degrees and moved 100 units together and then a .1 second paus and do it again.

How could I get this to chase a first person player?
The cube would only be able to move 100 untis on either the x or y axis obviously…and let’s say it was setup to see which distance was shorter either X or Y and move that direction.
Hoe can I do that??

I figured subtracting the distance from the player and the cube would give me SOME sort of idea…but honestly sense the axis could be negative OR positive I’m having trouble.

Is there a simple way to tell a cube by lerping vectors via float track timelines to move towards the player in the correct and closest direction??
I hope this made sense. thank you!!!

This tutorial will tell you all the basics about what you need to make your AI to chase player. Base on this, you may develop it further to fit your need.

I am not trying to create AI with a nav mesh. This is strictly math based.
Thank you for trying to help… But I need movement that only consists of four directions. Positive and negative on the X and Y. Take a timeline and lerp it between the actors initial location and then 100 units on the x and y toward the player. how can I tell it how to know which way to move 100 units based on the players location?