mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
bullet: restore behavior of in_contact flag
c18abad8c3373aff134dd02d099d476d094b0b69 added a call that resets the m_isInContact flag, so this resets it, for better or worse. We may want to revisit whether #349 was indeed the right fix to #250. Fixes #453
This commit is contained in:
parent
3adc7d977e
commit
b38faadf5f
@ -235,10 +235,13 @@ void BulletVehicle::
|
|||||||
do_sync_b2p() {
|
do_sync_b2p() {
|
||||||
|
|
||||||
for (int i=0; i < _vehicle->getNumWheels(); i++) {
|
for (int i=0; i < _vehicle->getNumWheels(); i++) {
|
||||||
// synchronize the wheels with the (interpolated) chassis worldtransform
|
btWheelInfo &info = _vehicle->getWheelInfo(i);
|
||||||
_vehicle->updateWheelTransform(i, true);
|
|
||||||
|
|
||||||
btWheelInfo info = _vehicle->getWheelInfo(i);
|
// synchronize the wheels with the (interpolated) chassis worldtransform.
|
||||||
|
// It resets the m_isInContact flag, so restore that afterwards.
|
||||||
|
bool in_contact = info.m_raycastInfo.m_isInContact;
|
||||||
|
_vehicle->updateWheelTransform(i, true);
|
||||||
|
info.m_raycastInfo.m_isInContact = in_contact;
|
||||||
|
|
||||||
PandaNode *node = (PandaNode *)info.m_clientInfo;
|
PandaNode *node = (PandaNode *)info.m_clientInfo;
|
||||||
if (node) {
|
if (node) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user