MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Friction

Function Friction

engine/Poseidon/World/Simulation/Simul.cpp:882–894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

880}
881
882void Friction(float& speed, float friction, float accel, float deltaT)
883{
884 speed += accel * deltaT;
885 if (speed * friction > 0)
886 { // friction must oppose speed
887 float oSpeed = speed;
888 speed -= friction * deltaT;
889 if (oSpeed * speed <= 0)
890 {
891 speed = 0;
892 }
893 }
894}
895
896void Friction(Vector3& speed, Vector3Par friction, Vector3Par accel, float deltaT)
897{

Callers 8

ApplyForcesMethod · 0.85
MoveMethod · 0.85
Thing.cppFile · 0.85
SimulateMethod · 0.85
SimulateMethod · 0.85
SimulateOneIterMethod · 0.85
SimulateMethod · 0.85
SimulateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected