Hi
Trying to look to find a way (if possible) to read a vector2 (from mouse delta for example) in a custom binding. currently have the below but are unabel to read into the vector2 as it does not have a icomparable and is throwing an error, have tried to make a custom vector2 struct with one and use that but getting an error. Looking to make it only track this input if the right mouse is down as a modifier as part of this input (for now ill just have a new binding for this but if anyone knows how to read mouse delta in a custom input binding that would be brilliant)
[InputControl(layout = "Vector2")]
public int binding;
[InputControl(layout = "Button")] public int modifier;
static Vector2BindingWithModifierComposite()
{
InputSystem.RegisterBindingComposite<Vector2BindingWithModifierComposite>();
}
[RuntimeInitializeOnLoadMethod]
static void Init() {} // Trigger static constructor.
public override Vector2 ReadValue(ref InputBindingCompositeContext context)
{
//check modifier is on here
return context.ReadValue<Vector2>(binding);
}