Hey, I am currently running into an issue which i can not entirely get my head around.
I have a simple Jump method that performs that code snippet when the Jump KeyDown gets tracked:
if (Physics.Raycast(transform.position - _PositionShift, Vector3.down, out var hit, _GroundCastLength, _Mask))
{
if (hit.collider.tag == "Ground") gravityValue = _JumpForce;
}
With the Gravity kinda performing constantly like that:
Overall no issues here. Now, when i load my Menu (which is in a separate Scene) additive, the Jump wont perform like it normally would. It jumps a much lesser high than it is supposed to.
So here is my question, does the LoadSceneAsync(“MenuScene”, LoadSceneMode.Additive); mess with the physics in any way?
Physics doesn’t know about that stuff. All it knows are physics components that generate physics objects. When loading another scene, if you’re loading physics objects then they may affect what you’re doing depending on what they are. If it’s a menu then no, you’re looking in the wrong place.
Maybe you’ve just created a frame-dependent movement doing moves per-frame or something. The frame-rate changes, so does your physics.
Yes the Frame difference was messing around with my Input Prediction. Currently for simplicity i used a frame dependet movement system. Despite locking the framerate to 32, the drop seems significant enough to reach the .001 tolerance.