Approaches to building a Motorcycle in Unreal 4?

Hey everyone I’m looking for some guidance on how to build out a ridable motorcycle for a 3rd person character pawn.

I’ve worked with extending the 4 wheeled example but alot of the engine systems were a bit obtuse, and i’d like to tackle the challenge of building something like this from scratch

Can someone give me a good breakdown of what features I would need to consider to make a semi realistic Mototrcycle from scratch using C++?

Scoped Features that I’d love help with:
States for Riding and “Walking” the bike
Ability for a character pawn to ride and dismount
Tunable engine curves
Wheel driven movment
Auto Correction and Stability
AI controllabity

If you ever manage to figure out AI Controllability let me know… I’m having awful issues with that and my own Movement Component.

As for Auto-Correction, that’s fairly simple to implement. You can create a Torque force that you apply along the bikes Forward Vector, which is Multiplied each frame by the Dot of the Bikes Up-Vector and the terrains Up Vector. To get the Terrains Up-Vector, I’d take the average normal direction at the two wheel contact points. That way as you lean more to the left or right, the torque will be constantly trying to force you back upright. I’ve done something similar for my Hovertank Movement Component, though I actually set angular velocity instead of adding torque in my case.

Character possession shouldn’t be too difficult, you just possess the bike when the character class mounts it. My Hovertanks are Pawns, and since you can’t ever see the pilots I just kill them when the player enters it, and spawn a new one when they exit. You could do something similar in your case but keep the old pawn alive and switch back to it. It’ll probably save you some headaches in Multiplayer too if you keep the old Pawn around.

You should be able to use some of the Wheel stuff from PhysX and the engine tuning that goes with. I don’t really know much more than that I’m afraid, I steered clear of PhysX in my case since it was easier for me that way, but WheeledVehicle component should be able to give you some pointers!

This could be a good start