Hi guys
I have just tweaked the FPSController Script so that when you are below 6y, you are slower and gravity is a little weaker. This is to simulate underwater effects, but when you come out of the water, the effects are still applied.
if ((transform.position.y < waterLevel) != isUnderwater) {
isUnderwater = transform.position.y < waterLevel;
m_WalkSpeed = 3;
m_RunSpeed = 6;
m_JumpSpeed = 12;
}
This is run in the Update() void so it will check every frame.
Does someone have a solution so when you come out of the water, the original movement is used? Thanks.