Skip to content

Commit e5e59f6

Browse files
committed
Hopeful fix to actor stickiness on occasion
1 parent f610ea6 commit e5e59f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Source/Entities/AtomGroup.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,8 +1264,9 @@ bool AtomGroup::PushAsLimb(const Vector& jointPos, const Vector& velocity, const
12641264
}
12651265

12661266
if (Actor* owner = dynamic_cast<Actor*>(m_OwnerMOSR)) {
1267-
bool againstTravelDirection = owner->GetController()->IsState(MOVE_LEFT) && pushImpulse.m_X > 0.0F ||
1268-
owner->GetController()->IsState(MOVE_RIGHT) && pushImpulse.m_X < 0.0F;
1267+
bool againstTravelDirection = !owner->GetController()->IsState(BODY_JUMP) && /*owner->EstimateJumpHeight() > 0.0F && // little inefficient for now*/
1268+
((owner->GetController()->IsState(MOVE_LEFT) && pushImpulse.m_X > 0.0F) ||
1269+
(owner->GetController()->IsState(MOVE_RIGHT) && pushImpulse.m_X < 0.0F));
12691270
if (againstTravelDirection) {
12701271
// Filter some of our impulse out. We're pushing against an obstacle, but we don't want to kick backwards!
12711272
const float againstIntendedDirectionMultiplier = 0.3F;

0 commit comments

Comments
 (0)