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

Method UpdateEnginePh

ogsr_engine/xrGame/CustomRocket.cpp:440–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438}
439
440void CCustomRocket::UpdateEnginePh()
441{
442 float force = m_fEngineImpulse * fixed_step; // * Device.fTimeDelta;
443 float k_back = 1.f;
444 Fvector l_pos, l_dir;
445 l_pos.set(0, 0, -2.f);
446 l_dir.set(XFORM().k);
447
448 l_dir.normalize();
449 m_pPhysicsShell->applyImpulse(l_dir, (1.f + k_back) * force);
450 m_pPhysicsShell->get_LinearVel(l_dir);
451 l_dir.normalize_safe();
452 l_dir.invert();
453 m_pPhysicsShell->applyImpulseTrace(l_pos, l_dir, force);
454 l_dir.set(0, 1.f, 0);
455 force = m_fEngineImpulseUp * fixed_step; // * Device.fTimeDelta;
456 m_pPhysicsShell->applyImpulse(l_dir, force);
457
458 // m_pPhysicsShell->set_AngularVel()
459}
460
461void CCustomRocket::UpdateEngine()
462{

Callers

nothing calls this directly

Calls 8

XFORMFunction · 0.85
setMethod · 0.45
normalizeMethod · 0.45
applyImpulseMethod · 0.45
get_LinearVelMethod · 0.45
normalize_safeMethod · 0.45
invertMethod · 0.45
applyImpulseTraceMethod · 0.45

Tested by

no test coverage detected