Example #1
0
    private void HandleFluidDynamicChildren()
    {
        FluidDynamic flchild = GetComponentInNetworkedChildren <FluidDynamic>();

        if (flchild != null)
        {
            player.Accelerate(flchild.CalculateAirFriction(velocity: player.GetVelocity(),
                                                           held_by_player: true));
            player.Accelerate(flchild.CalculateBuoyantForce());
        }
    }
Example #2
0
    private void HandleFluidDynamicChildren()
    {
        FluidDynamic flchild = GetComponentInNetworkedChildren <FluidDynamic>();

        if (flchild != null)
        {
            player.Accelerate(flchild.CalculateAirFriction(
                                  velocity: player.GetVelocity(),
                                  desiredDirection: player.GetMoveVector()));
            player.Accelerate(flchild.CalculateBuoyantForce());
        }
    }