Turning Vehicle while stationary

Is there any way to turn the wheeled vehicle pawn without applying any throttle?

I’m trying to make a tank for a level design test and I’ve been trying to get any kind of functional work around to no avail.

I’ve tried setting the pawn to follow the controller yaw, accessing the wheel rotation so I can turn the right side backwards, and even stitching two vehicle movement components together to no avail.

Please can someone help me figure out how to TURN dang pawn class?

I have been trying to work out as well, the only thing I could come up with that might work is trying to add a large rotational force to the tank to make it turn and then setting all the tyres but the middle ones on each side to have no sideways grip, I don’t know if it will work though.

anyway I hope you find a way that works:)

I think even actual tank you have to apply throttle, it’s just when turning in place, left and right track apply the same amount of torque but in different direction.
And, to be honest, after looking at vehicle movement component for a while, I’d say it’s not really well suited for a tank, even if you have 2 of them(which I doubt that makes any sense for a pawn class).
Maybe you mean to have one whole car as one side of track? That might work but kinda inefficient.
I would spend time study the source code on how they come up with that vehicle movement, and maybe modify one so it’s more tank like.

Maybe other guys have more experience with vehicle can give you better idea, but above is my honest opinion.

in the case of stitching 2 together, it was an attempt to have to linear sets of wheels that could be controlled independently, ie when turning you could place forward throttle on one and backwards throttle on the other.

I need to find time to dig into the source code, but I am surprised as to why particular pawn has most of the basic movement overrides locked. Everything from altering the root component’s orientation in any kind of blueprint and even directly controlling the bones the wheels are attached to (because the wheel class has 0 exposed variables beyond metrics and defaults).

i think that was kinda intended by Epic, they want to have a robust car type base class, but called it vehicle anyway. since they also have a QC to go through before they can release it as official, it will mostly be locked just to pass QC and not getting breaked easily.

We do have some plans to add a tank example at some point, it needs a few bits of functionality exposed (PxVehicleDriveTank) before it can be done in Blueprint though. I don’t think will make it in for 4.5 though I’m afraid.

I’m not sure what all is exposed by PxVehicleDriveTank, but wouldn’t it be simpler to just add a new drive train to allow us to send the throttle amount to a set of VehicleWheels? for example:

  • Create 2 instances of VehicleWheel that are for LeftWheels/RightWheels (instead of front/back) and set the steering angle for each to 0.
  • When the user sends steering input, use it to send the throttle to the corresponding VehicleWheel set by sending the positive to one side, and negating the value on the other side, such as LeftWheels forward (1) / RightWheels backwards (-1) to rotate to the right, the opposite to rotate left.
  • would be a simple way of getting the functionality, although it is limited. I actually tried to play around with one of my vehicles to see what was possible, but without a new drive-train type I wasn’t able to get it to work without implementing my own system.

Or create a VehicleWheel instance for each of the 4 drive wheels, and apply throttle to each separately in blueprint, like having a motor for each wheel so you can make it rotate independent or the other wheels, then you can easily create kind of movement with a lot of different variation depending on what the vehicle is.

I am not sure how you would set the friction for these wheels as you want the vehicle to slide easily while turning, and not while driving, that might be harder to get right, but allowing independent throttle could allow for some neat . Just a thought… :slight_smile: