Get mouse location with new input system without moving mouse

I may have coded myself into a hole here.
So for the new input system. The mouse position is updated and stored every time you move the mouse. This becomes a problem when your character needs to look at the mouse but you don’t want to move it. The character will look at mouse’s last transmitted position instead of its current position. Here’s the video show casing the problem.

My character and camera move together. It moves the mouse but there’s no moving input.
the On action function can’t be called directly, like OnMoveMouse( inputAction.callbackContext cntx).
How do I update the mouse’s position without moving it?

You can get the mouse position on update and cast a ray to get the world position of the mouse and use that value. Since it will be on update it should be okay. There is a .ReadValue<T>() //for you T is Vector2 method in the input actions where you can get the value in update. Do try it.

Edit: You need the mousePosition value to be available in your input actions. So you need to add a mousePosition value in your input actions(type vector2). if position doesn’t work try mouseDelta.

@Archroda
I have tried that before


.ReadValue returns the same location of mouse’s last transmission.
EDIT:

my input action has a mousPosi action. that’s how I was able to get it before.
The problem is that it only gets called when I move the mouse.