How to move forward when left and right mouse button is pressed

I’m trying to get a system that makes the player move forward when the left and rigth mouse button is pressed at the same time in C++.
I’m able to do it in Bleuprint but I want to make it in C++.

Can someone help me?

Someone else might have a more specific answer, but here’s how I’ve done something like that in the past.

  1. Start UE4 from a source build with Visual Studio. It’s a pain, but those are the tools.
  1. From the UE4 editor, double-click a blueprint node. This should take you to the BP node’s C++ implementation in Visual Studio. This should give you a place to start in C++. (You might be able to do this without step 1)

If that’s muddy or scary, I’d recommend a course on Udemy.com. There are a bunch and they go on sale for < $15 all the time. Good luck with your project!

Sorry for not replying sooner.

I know how to do it in Blueprint, But I want to use C++