Geometry / trigonometry question related to video game character behavior

Hello guys,

I’m a little rusty on geometry and trigonometry stuff and could use a little help! It’s rather super urgent, too :stuck_out_tongue:

So I have an AI controlled character who moves in quick jumps towards its target in a top-down view. It knows its target position and its own, of course, as well as the average size of his jumps.

Let’s say the character is at point O, and the target is at M.
A is the point of segment [OM] that represents roughly the length of the first jump; except that that character doesn’t jump straight towards its victim but rather, with an angle alpha. I would like to find the coordinates of point B representing the actual landing point of the jump.

Depending on what’s the easiest to understand and/or what’s the lightest on the CPU, B can either be on the perpendicular line crossing OM in A (see image above), or on the circle of center O and ray OA.

Either way, B is probably best to be on the demi-line starting in O with angle AOB = alpha.

Thanks! Hopefully it’s clearly explained, I’m not expert with math terms in English.

PS: If you could avoid using vector math for the solution, that would make it easier on me :stuck_out_tongue: