How to retain constant velocity when friction increases












0












$begingroup$


I'm writing a game and I'm trying to calculate how to retain a constant velocity no matter what the friction is. For example if the player has a velocity of 25, a mass of 40, friction is 0.1 (friction is constant) and acceleration can be calculated through: velocity / (mass + 5). Then I want that player to still have a velocity of 25. So what I'm after is some sort of formula using the acceleration in order to cancel out the friction, no matter what the friction is. Thank you for your time!










share|cite|improve this question









$endgroup$












  • $begingroup$
    Can you just set friction to 0?
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:04










  • $begingroup$
    No, it's done s that if someone wants to change the friction the velocity should still remain the same, no matter what. @user3482749
    $endgroup$
    – Blue shirt
    Nov 29 '18 at 16:08










  • $begingroup$
    You're writing the game. Just write some code that sets friction to zero while this is going on, while keeping track of the actual friction in some other variable as it changes, then write the friction back to the variable when this constant-velocity state ends.
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:10
















0












$begingroup$


I'm writing a game and I'm trying to calculate how to retain a constant velocity no matter what the friction is. For example if the player has a velocity of 25, a mass of 40, friction is 0.1 (friction is constant) and acceleration can be calculated through: velocity / (mass + 5). Then I want that player to still have a velocity of 25. So what I'm after is some sort of formula using the acceleration in order to cancel out the friction, no matter what the friction is. Thank you for your time!










share|cite|improve this question









$endgroup$












  • $begingroup$
    Can you just set friction to 0?
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:04










  • $begingroup$
    No, it's done s that if someone wants to change the friction the velocity should still remain the same, no matter what. @user3482749
    $endgroup$
    – Blue shirt
    Nov 29 '18 at 16:08










  • $begingroup$
    You're writing the game. Just write some code that sets friction to zero while this is going on, while keeping track of the actual friction in some other variable as it changes, then write the friction back to the variable when this constant-velocity state ends.
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:10














0












0








0


1



$begingroup$


I'm writing a game and I'm trying to calculate how to retain a constant velocity no matter what the friction is. For example if the player has a velocity of 25, a mass of 40, friction is 0.1 (friction is constant) and acceleration can be calculated through: velocity / (mass + 5). Then I want that player to still have a velocity of 25. So what I'm after is some sort of formula using the acceleration in order to cancel out the friction, no matter what the friction is. Thank you for your time!










share|cite|improve this question









$endgroup$




I'm writing a game and I'm trying to calculate how to retain a constant velocity no matter what the friction is. For example if the player has a velocity of 25, a mass of 40, friction is 0.1 (friction is constant) and acceleration can be calculated through: velocity / (mass + 5). Then I want that player to still have a velocity of 25. So what I'm after is some sort of formula using the acceleration in order to cancel out the friction, no matter what the friction is. Thank you for your time!







functions






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Nov 29 '18 at 16:03









Blue shirtBlue shirt

1




1












  • $begingroup$
    Can you just set friction to 0?
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:04










  • $begingroup$
    No, it's done s that if someone wants to change the friction the velocity should still remain the same, no matter what. @user3482749
    $endgroup$
    – Blue shirt
    Nov 29 '18 at 16:08










  • $begingroup$
    You're writing the game. Just write some code that sets friction to zero while this is going on, while keeping track of the actual friction in some other variable as it changes, then write the friction back to the variable when this constant-velocity state ends.
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:10


















  • $begingroup$
    Can you just set friction to 0?
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:04










  • $begingroup$
    No, it's done s that if someone wants to change the friction the velocity should still remain the same, no matter what. @user3482749
    $endgroup$
    – Blue shirt
    Nov 29 '18 at 16:08










  • $begingroup$
    You're writing the game. Just write some code that sets friction to zero while this is going on, while keeping track of the actual friction in some other variable as it changes, then write the friction back to the variable when this constant-velocity state ends.
    $endgroup$
    – user3482749
    Nov 29 '18 at 16:10
















$begingroup$
Can you just set friction to 0?
$endgroup$
– user3482749
Nov 29 '18 at 16:04




$begingroup$
Can you just set friction to 0?
$endgroup$
– user3482749
Nov 29 '18 at 16:04












$begingroup$
No, it's done s that if someone wants to change the friction the velocity should still remain the same, no matter what. @user3482749
$endgroup$
– Blue shirt
Nov 29 '18 at 16:08




$begingroup$
No, it's done s that if someone wants to change the friction the velocity should still remain the same, no matter what. @user3482749
$endgroup$
– Blue shirt
Nov 29 '18 at 16:08












$begingroup$
You're writing the game. Just write some code that sets friction to zero while this is going on, while keeping track of the actual friction in some other variable as it changes, then write the friction back to the variable when this constant-velocity state ends.
$endgroup$
– user3482749
Nov 29 '18 at 16:10




$begingroup$
You're writing the game. Just write some code that sets friction to zero while this is going on, while keeping track of the actual friction in some other variable as it changes, then write the friction back to the variable when this constant-velocity state ends.
$endgroup$
– user3482749
Nov 29 '18 at 16:10










2 Answers
2






active

oldest

votes


















0












$begingroup$

If you say acceleration=velocity/(mass+5) there is no consideration of friction there, so it will have no impact. If you want the velocity to be constant you need the acceleration to be zero unless you are using the terms in a nonstandard way. It won't be friction that changes the velocity, it will be your acceleration equation.






share|cite|improve this answer









$endgroup$





















    0












    $begingroup$

    You need to have a force of (µmg) being applied to get zero acceleration, but formula using acceleration doesn't really make sense since you need the acceleration to be zero.



    Maybe you want constant acceleration?






    share|cite|improve this answer









    $endgroup$













      Your Answer





      StackExchange.ifUsing("editor", function () {
      return StackExchange.using("mathjaxEditing", function () {
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      });
      });
      }, "mathjax-editing");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "69"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3018828%2fhow-to-retain-constant-velocity-when-friction-increases%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0












      $begingroup$

      If you say acceleration=velocity/(mass+5) there is no consideration of friction there, so it will have no impact. If you want the velocity to be constant you need the acceleration to be zero unless you are using the terms in a nonstandard way. It won't be friction that changes the velocity, it will be your acceleration equation.






      share|cite|improve this answer









      $endgroup$


















        0












        $begingroup$

        If you say acceleration=velocity/(mass+5) there is no consideration of friction there, so it will have no impact. If you want the velocity to be constant you need the acceleration to be zero unless you are using the terms in a nonstandard way. It won't be friction that changes the velocity, it will be your acceleration equation.






        share|cite|improve this answer









        $endgroup$
















          0












          0








          0





          $begingroup$

          If you say acceleration=velocity/(mass+5) there is no consideration of friction there, so it will have no impact. If you want the velocity to be constant you need the acceleration to be zero unless you are using the terms in a nonstandard way. It won't be friction that changes the velocity, it will be your acceleration equation.






          share|cite|improve this answer









          $endgroup$



          If you say acceleration=velocity/(mass+5) there is no consideration of friction there, so it will have no impact. If you want the velocity to be constant you need the acceleration to be zero unless you are using the terms in a nonstandard way. It won't be friction that changes the velocity, it will be your acceleration equation.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Nov 29 '18 at 16:14









          Ross MillikanRoss Millikan

          293k23197371




          293k23197371























              0












              $begingroup$

              You need to have a force of (µmg) being applied to get zero acceleration, but formula using acceleration doesn't really make sense since you need the acceleration to be zero.



              Maybe you want constant acceleration?






              share|cite|improve this answer









              $endgroup$


















                0












                $begingroup$

                You need to have a force of (µmg) being applied to get zero acceleration, but formula using acceleration doesn't really make sense since you need the acceleration to be zero.



                Maybe you want constant acceleration?






                share|cite|improve this answer









                $endgroup$
















                  0












                  0








                  0





                  $begingroup$

                  You need to have a force of (µmg) being applied to get zero acceleration, but formula using acceleration doesn't really make sense since you need the acceleration to be zero.



                  Maybe you want constant acceleration?






                  share|cite|improve this answer









                  $endgroup$



                  You need to have a force of (µmg) being applied to get zero acceleration, but formula using acceleration doesn't really make sense since you need the acceleration to be zero.



                  Maybe you want constant acceleration?







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Nov 29 '18 at 16:18









                  Kindeep Singh KargilKindeep Singh Kargil

                  12




                  12






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Mathematics Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3018828%2fhow-to-retain-constant-velocity-when-friction-increases%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Plaza Victoria

                      Puebla de Zaragoza

                      Musa