User avatar
BenJo
Topic Author
Posts: 25
Joined: 20 Jun 2024, 15:42

MouseMove event trigger arguments to Unreal

06 Oct 2026, 18:21

Hey, if I wanted to handle the MouseMove EventTrigger, to pass its changed amount to Unreal as an invoke command, is there a way to pass that as a param? I don't see any current Mouse position params exposed anywhere.

There is the 'PassEventArgsToCommand' property, but I see it requires unboxing (as Noesis::MouseEventArgs), which I can't create a UFUNCTION() with a compatible arg.

Is there a way to do it purely in data setup, or is this something that requires custom code handling? Or, is there a better way to get information about where the mouse is within an element?
 
User avatar
sfernandez
Site Admin
Posts: 3363
Joined: 22 Dec 2011, 19:20

Re: MouseMove event trigger arguments to Unreal

07 Oct 2026, 13:15

Hello, as you mentioned the InvokeCommandAction must set the 'PassEventArgsToCommand' to true to receive the mouse event arguments. Then the command function will receive the params as a UNoesisBaseComponent, so you can define a UFUNCTION like this:
UFUNCTION(BlueprintCallable)
void DoSomething(UNoesisBaseComponent* Param)
{
    const Noesis::EventArgs* args = Noesis::Boxing::Unbox<const Noesis::EventArgs*>(Param->NoesisComponent);
    const Noesis::MouseEventArgs& mouseArgs = *(const Noesis::MouseEventArgs*)args;
    const Noesis::Point& mousePos = mouseArgs.position;
    ...
}
Please let me know if you need more help.
 
User avatar
BenJo
Topic Author
Posts: 25
Joined: 20 Jun 2024, 15:42

Re: MouseMove event trigger arguments to Unreal

07 Oct 2026, 18:09

Thank you, that worked.

Who is online

Users browsing this forum: No registered users and 12 guests