It happens in void BumperHitCircle::Collide(const CollisionEvent& coll) in collideex.cpp
This works only if dot is computed before calling Collide3DWall, but not after:
const float dot = coll.m_hitnormal.Dot(coll.m_ball->m_vel);
coll.m_ball->Collide3DWall(coll.m_hitnormal, m_elasticity, m_elasticityFalloff, m_friction, m_scatter);
if (m_pbumper->m_d.m_fHitEvent && (dot <= -m_pbumper->m_d.m_threshold))
The velocity of the ball is modified when calling Collide3DWall in ball.cpp:376
m_vel += dot * hitNormal; // apply collision impulse (along normal, so no torque)
Edited by Caligula_, 07 June 2019 - 05:41 PM.



Top















are all trademarks of VPFORUMS.