Vehicle with no drive

Hello UE4 community.

I’m trying to write a (more or less realistic) behaviour of an electric motor vehicle, which doesn’t have the gearbox and some other components provided by the default UE4 vehicle system. As far as I know, PhysX has many built-in vehicle types, such as PxVehicleNoDrive etc.

Is there a way to create such a vehicle without modifying the engine source code, only via subclassing (for example, VehicleMovementComponent or other classes)?

I’m a newbie to UE4 (but somewhat experienced in C++), so my question may be incorrect.

P.S. I’ve tried to use a gearbox with single forward gear, but this doesn’t seem realistic.

Thanks in advance

I am trying to do the exact same thing, did you find a solution?

From what I remember, one of the main differences between performance of electric and combustion engines is that electric engine can get from 0 to maximum torque instantly. Simply for a reason that output torque of electric engine depends solely on the “gas pedal” not on the RPM of axle as in combustion engines.
So the things I would try to do is setup just 3 gears [reverse, neutral, forward]. Modify engine torque curve to by just a straight line, starting and ending with the same maximum torque value. For the range of RPMs I would first go with something that starts from 0 and to incredibly high number, as I don’t know if vehiclecomponent will cap your torque to 0 at maximum RPM. In theory this setup should produce exactly the same torque at any RPM and torque output on wheels will be controlled solely by gas pedal.

EDIT: Your maximum RPM range can be calculated as this:
MaxWheelAngularVelocity = MaxVehicleVelocity / WheelRadius; //this will be Rad/Sec, MaxVehicleVelocity should be in m/sec and WheelRadius in meters, otherwise both should be in cm
MaxWheelRPM = MaxWheelAngularVelocity / 2 * PI * 60; // this is now rotation per minute
MaxAxleRPM = MaxWheelRPM / CurrentGearRatio / DifferentialRatio / FlyWheelRatio; //take into account gear box, differential and flywheel of the clutch

So if you know your theoretical top speed of the vehicle, this would be your maximum RPM for the engine torque curve