Is it possible to create vehicles other than cars and buses using KX_VehicleWrapper?

Does the Vehicle Wrapper support vehicles like ships, bicycles, UFOs, planes, and trains? I am asking this because you can apparently make a “vehicle constraint”, and this can have a number which defines the vehicle type, which ranges from 0 to 11 or something like that.

Exactly what do the numbers in the Vehicle Constraint (that range from 0 to 11) do

Example:

VehicleConstraint = controller.owner.createConstraint(controller.owner, 0,11) # What exactly does the first number 0 argument do and the last number 11 argument (that has a range from 0 to 11) do in createConstraint()?

Can the Vehicle Wrapper support vehicles that have no wheels? (Like ships and planes for example)

Some of those numbers can cause UPBGE to crash depending on the type of vehicle you are trying to create.

Short answer Yes. you can use it to specifically add wheels in any kind of object(can even be a mecha robot), but vehicle wrapper only do it, all the other stuff after simulating simple wheels are done by you in any way you want.
vehicle wrapper suports vehicles that touch the ground, with this i mean, you can create a amphibian car the part of it who shoud act like a common car on ground will work as expected, the part of it who drive in the water will be done by yourself, same for a airplane, lets say you did a GTA SA “Seaplane” who have wheels can land on water and also fly, you can just have your piece of code with vehicle wrapper anywhere without problem. also have vehicle wrapper without any wheel, but you cant add or remove wheels anytime because it will stop/lag your sim and if adding wheels can be missalingnated, another limit is raycast vehicles cant change friction/grip of wheels without taking them off and putting then back, what means your sim will never make “drift”/slide like professional racing/driving games do, only if you make a whole piece of code separated only to apply forces on it externally…

One problem. When I set the Vehicle type to be a different number than a car, it crashes. Why? Car is zero. Others are different numbers.

give the car really long suspension travel and make the wheels invisible and no collision

now its a hover car :3

Again short answer: the 11 is the vehicle wrapper option of createConstraint wide choices and zero is the second obj id but you cant use a second obj id with vehicle wrapper so you set to zero it.

sorry for late answer, well, the .createConstraint() is used to create other kind of constraints, like cone twist, hinges, and a 6dof customizable, where you can also make springs and a motor, so the ZERO on it refers to the second object physics id! but since we are not using it for only two objects but way more in one constraint we set this to zero to the code ignore it, and the 11 is the constraint type, this also can be from 2 to 17 for every single kind of constraint, this 11 is specifically the one to create “vehicles” who make this raycasted wheel collision with suspension for us, this is also why you should want to use it, because creating spring damper relations to wheels and car is unnecessary complicated and unstable…

more details on api:

https://docs.blender.org/api/2.79/bge.constraints.html?highlight=createconstraint#bge.constraints.createConstraint (how to use create const)

https://docs.blender.org/api/2.79/bge.types.KX_ConstraintWrapper.html?highlight=kx_constraintwrapper (what more constraints you have to chose)

https://docs.blender.org/api/2.79/bge.types.KX_VehicleWrapper.html#bge.types.KX_VehicleWrapper (what you can do with vehWrapper)

some of info is from dead site “tuturialsforblender3d” that showed properly how to use all these constaints,

plus you can set roll influence to negative values and make the car lean to the inside of the turns like hover cars and motorcycles!