MouseMove event trigger arguments to Unreal
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?
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?
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: MouseMove event trigger arguments to Unreal
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:
Please let me know if you need more help.
Code: Select all
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;
...
}
Who is online
Users browsing this forum: No registered users and 12 guests