How to create steering for a bike?

Hello

I am new to UE4 so have mercy! I am working on a small game, where I have a 2 wheeled bike. I use the rear wheel to accelerate the bike and I want to use the front one to turn the bike left or right; like a real bike. I’ve made the acceleration with blueprints, and I’ve tried to make the steering with blueprints aswell, which has not worked out at all. I am also open to any C++ suggestions! I know C# but C++ is something completely new to me.

My bike consists of 4 static meshes, Body, Front Wheel, Rear Wheel and the Front forks. How would I make the bike steer? I’ve tried many different blueprint ways, none of them seem to work the way I want them to. Would it be easier for me to end up to converting to a bike with bones or what? I am an open book so tell me as much as you can!

I think if you can get the Z-axis rotation from the front wheel and check how far it’s rotated from it’s neutral position (which would have to be the forward direction the entire bike is pointing to) and in what direction (either left or right), you’d have a value you can then connect to a “addactorworldoffset” node. This node will make your bike move in the direction you specify. I’m not sure how to do the math to make this work however, which is why I came looking for answers myself.

You do need to do an “add timeline” node (which is like a forloop but better for things like this) so you can make it execute constantly. Double click on the timeline node to open up a menu where you can tick a box that says “loop”

I’m also new, so if my advice gets you in more trouble then you are now, I’m probably wrong.

edit i looked at your screenshots and saw you used the event tick to make the thing execute constantly, so forget the part about the “add timeline”.

However you can only have 1 event tick, so if you want to add other stuff to the event tick, you’ll have to “add custom event”, plug the thing you now have directly connected to your event tick into the custom event we’ve just created, and then go to your event tick and type the name of the custom event.

You’ll be able to add multiple custom events to the event tick.