Bullet physics on aircraft.?.


Im trying to use bullet as the physics on my airplane.
im trying to wrap my head around: panda3d.org/manual/index.php/Bullet_Vehicles
but i cant find the solution to my problem.
in short:
i want to use the BulletVehicle createWheel on the planes Gear (“tires”) because. it allows to apply break force , friction and more. which i kind of want i want.

however when i create the bullet wheel, it get position at some weird place

im guessing this is a problem with getting it positioned correctly.
i also want to use a type frontwheel for the tailwheel. but i need a better “chassie” first

so my question is really. how can i get the bulletwheel to follow my animation which i have created manualy,

Gear anim code.


My bullet setup is rather simple. its just some stuff i tried to put to getter without luck.

so how can i do this ??

About the wheel positioning: I don’t know what transform “self.plane_L_wheel” in your code has, so I can’t say if it is right or not. The “Cs” in the function name means “Chassis space”, that is the coordinate system of the chassis. From your screenshot it seems that the y-axis of your plane is forward, the x-axis right, and the y-axis up. So you could try something like

wheel.setChassisConnectionPointCs(Point3(-0.5, 1.0, -1.0))

for the left wheel. +0.5 for the right. Axis setup seems right to me (though commented out!). You should set the wheel radius too, maybe 0.3.

About the animation: this is not possible. Since Bullet can’t simulate a plane in the air it would be wise to just use a kinematic rigid body while the plane is airborne, and only when the gears are out and the plane is about to touch the ground replace it with a vehicle.

Finally, “front” wheel in Bullet means stearable. For a plane, the two front wheels are usually not stearable (only the small one at the rear). So you would use frontwheel=False for the forward wheels, and frontwheel=True for the rear wheel.

Umm… just an addendum in case this has not been clear: Bullet does not have flight dynamics, and a Bullet vehicle can not fly. Flight dynamics are usually provided by separate engines, e. g. JSBSim. As far as I know Panda3D has not integrated flight dynamics module.

Thanks for clearing that up. i was not aware of Bullet vehicle can not fly.
i though they act like normal wheels without any “land” contact. when they where above the ground.

As for flight dynamics, JSBSim would be nice to use. but i guess its not so easy to implement.
im not that good in c++ , altho i see you are listed with the JSBSim Python Bindings on sourceforce.
sourceforge.net/u/enn0x/profile/ "i spy with my little eye " :laughing:
have you already done your own implemented of this in panda3d ?

This is a very early work of mine. I handed the project over to two other developers. For me it has been just an exercise, for writing Python extensions completely by hand.

There has been no need to integrate with Panda3D - the information exchange between Panda3D and JSBSim can be done completely on the Python level. However, I don’t think the JSBSim bindings will compile out of the box with current Python versions.