mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
bullet: Interpolate BulletVehicle-wheel transform before syncing it to panda
Bullet automatically interpolate most bodies for us (for example the "chassis" of a BulletVehicle), but BulletVehicle-wheels must be manually interpolated by calling 'updateWheelTransform()'. Otherwise they will slowly rubber-band between their intended position and a position one frame ahead in time. For more information see issue #250.
This commit is contained in:
parent
29a08932ea
commit
c18abad8c3
@ -232,6 +232,9 @@ void BulletVehicle::
|
||||
do_sync_b2p() {
|
||||
|
||||
for (int i=0; i < _vehicle->getNumWheels(); i++) {
|
||||
// synchronize the wheels with the (interpolated) chassis worldtransform
|
||||
_vehicle->updateWheelTransform(i, true);
|
||||
|
||||
btWheelInfo info = _vehicle->getWheelInfo(i);
|
||||
|
||||
PandaNode *node = (PandaNode *)info.m_clientInfo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user