mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 01:44:06 -04:00
parent
0f5da1c155
commit
05eaf930b1
@ -171,14 +171,14 @@ set_pitch_control(PN_stdfloat pitch) {
|
||||
* Factory method for creating wheels for this vehicle instance.
|
||||
*/
|
||||
BulletWheel BulletVehicle::
|
||||
create_wheel() {
|
||||
create_wheel(PN_stdfloat suspension_rest_length) {
|
||||
LightMutexHolder holder(BulletWorld::get_global_lock());
|
||||
|
||||
btVector3 pos(0.0, 0.0, 0.0);
|
||||
btVector3 direction = get_axis(_vehicle->getUpAxis());
|
||||
btVector3 axle = get_axis(_vehicle->getRightAxis());
|
||||
|
||||
btScalar suspension(0.4);
|
||||
btScalar suspension(suspension_rest_length);
|
||||
btScalar radius(0.3);
|
||||
|
||||
btWheelInfo &info = _vehicle->addWheel(pos, direction, axle, suspension, radius, _tuning._, false);
|
||||
|
@ -85,7 +85,7 @@ PUBLISHED:
|
||||
void apply_engine_force(PN_stdfloat force, int idx);
|
||||
|
||||
// Wheels
|
||||
BulletWheel create_wheel();
|
||||
BulletWheel create_wheel(PN_stdfloat suspension_rest_length=0.4);
|
||||
|
||||
int get_num_wheels() const;
|
||||
BulletWheel get_wheel(int idx) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user