Unity: distance with addforce

Asked

Viewed 85 times

0

I’m creating a game where you apply a certain force to the block and it walks vertically and it has to stop at a certain point and I want to do this by AddForce.

But on paper, I’m using the formula:

distancia = velocidade ao quadrado/(aceleração vezes coeficiente de atrito) 

And the distance that the object travels gives a different value of this formula. I wanted to solve this problem.

Remarks:

  • Drag set to 0(angle also).
  • The speed of Y also varies when the block moves, even if in the AddForce I’m asking only the position X.
  • I don’t know if it interferes either, but I put the block, on top of the plane, in the 2D position (10,-1) and when I start the game, it is pushed into position (-10,00008, -0,9850087)
  • The object is fired up or down ? This formula does not seem correct to me. To calculate position has the formula: p = 0.5gt^2 + vt + p0

  • Articuno: In this case the object is pushed right, and not thrown up (Vector2.right*force). And it does not have a formula without the time?

  • Everything that is related to speed and acceleration is related to time. This is already part of the same laws of physics.

  • Vlw gente =D, was that doubt I was having XD

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.