Bug in OVRPlayerController - inconsistent move speed
I found a bug in this code (exists in both 0.1.0 and 0.1.2 utils) in OVRPlayerController that will end up causing inconsistent movement speed between DK1, DK2, and CV1 headsets, since this bug makes the speed be affected by frame rate. DK1 will have faster move speed than DK2, and DK2 faster than CV1.
moveInfluence is therefore proportional the square of Time.deltaTime instead of Time.deltaTime as was likely intended to make the code framerate independent. This extra multiply of SimulationRate * Time.deltaTime going to cause DK1, DK2, and CV1 versions to all have different response rates to the controller.
Correct fix is to remove 2nd Simultation Rate * Time.deltaTime multiplier (since MoveScale already accounts for this):
Just wanted to give people a heads up that about this as it would definitely impact gameplay. I noticed this because during an occasional game glitch (frame took really long), the movement speed would spike way up and seem to teleport the player. This was due to the double multiply by Time.deltaTime. Fixing the code above also fixes that issue.
ccs
line 256: MoveScale *= SimulationRate * Time.deltaTime;
line 317: moveInfluence = SimulationRate * Time.deltaTime * Acceleration * 0.1f * MoveScale * MoveScaleMultiplier;
moveInfluence is therefore proportional the square of Time.deltaTime instead of Time.deltaTime as was likely intended to make the code framerate independent. This extra multiply of SimulationRate * Time.deltaTime going to cause DK1, DK2, and CV1 versions to all have different response rates to the controller.
Correct fix is to remove 2nd Simultation Rate * Time.deltaTime multiplier (since MoveScale already accounts for this):
line 317: moveInfluence = Acceleration * 0.1f * MoveScale * MoveScaleMultiplier;
Just wanted to give people a heads up that about this as it would definitely impact gameplay. I noticed this because during an occasional game glitch (frame took really long), the movement speed would spike way up and seem to teleport the player. This was due to the double multiply by Time.deltaTime. Fixing the code above also fixes that issue.
ccs
