MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / CutVelocity

Method CutVelocity

ogsr_engine/xrGame/PHCharacter.cpp:125–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123}
124
125void CPHCharacter::CutVelocity(float l_limit, float /*a_limit*/)
126{
127 dVector3 limitedl, diffl;
128 if (dVectorLimit(dBodyGetLinearVel(m_body), l_limit, limitedl))
129 {
130 dVectorSub(diffl, limitedl, dBodyGetLinearVel(m_body));
131 dBodySetLinearVel(m_body, diffl[0], diffl[1], diffl[2]);
132 dBodySetAngularVel(m_body, 0.f, 0.f, 0.f);
133 dxStepBody(m_body, fixed_step);
134 dBodySetLinearVel(m_body, limitedl[0], limitedl[1], limitedl[2]);
135 }
136}
137
138const Fmatrix& CPHCharacter::XFORM() const
139{

Callers

nothing calls this directly

Calls 6

dVectorLimitFunction · 0.85
dBodyGetLinearVelFunction · 0.85
dVectorSubFunction · 0.85
dBodySetLinearVelFunction · 0.85
dBodySetAngularVelFunction · 0.85
dxStepBodyFunction · 0.85

Tested by

no test coverage detected