PLEASE EVEN IF YOU DON’T KNOW THE ANSWER ANY IDEAS ARE VERY WELCOME IT MAY SET ME ON THE RIGHT PATH PLEASE I BEG OF YOU ANYTHING HELPS
OK so basically I am adding input actions to my inventory system to try and make everything feel smoother. I have added Control + Q to drop a stack and Q to drop a single item. But I am now trying to add Shift + LMB to move item stacks to and from the inventory, but now the only time it works is when I double click.
Here is how I have setup the Shift action
Here is the LMB action
Here is the mapping context
And finally here is my code
void ABil::ShiftPressed(const FInputActionValue& Value)
{
bShiftPressed = !bShiftPressed;
}
void ABil::LeftClick(const FInputActionValue& Value)
{
if (bShiftPressed)
{
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Turquoise, TEXT("Shift was also pressed"));
OnShiftLeftClickPressed.Broadcast();
}
}
And by the way I have tried having two functions bound to pressed and released but then it doesn’t move at all even with a double click. And I only get the message “Shift was also pressed” when I double click.
If you need anymore information at all please ask and I’ll send it.
Thank you in advance.