Determining if a force is making a difference

In summary, the conversation discusses the creation of a game and the need for a variable to determine how the running animation should be played based on different scenarios. The solution proposed involves using variables for the speed of the ground and character, as well as considering friction and collisions to accurately measure relative velocity.
  • #1
DrSammyD
21
0
So I'm creating a game. I have a physics engine in the game. There's a use case that I've come up with that I don't know how to solve.

Imagine a character is running
1.
---------0 ------------------>
-------------------------------------------

then it hit's a wall
2.
---------0>| BLAM!
-------------------------------------------

now it's no longer moving forward.

now Imagine a character running on a treadmill
3.
---------0>
-----<------<-----<------<-----<------<

Then a wall comes down the treadmill
4.
<-------0| BLAM!
-----<------<-----<------<-----<------<

Or the character is running on a treadmill but not fast enough to keep up
5
-----<--0
-----<------<-----<------<-----<------<

I need a variable that will determine that cases 1 and 3 are the same, and 2 and 4 are the same, when the only information I have are the forces acting on the character (the ground, the box, friction etc.), the force that the character is providing itself (e.g. the running force), and the character's velocity.

I'm trying to determine the speed at which the running animation should be played. clearly in cases 2 and 4, it should not be playing, in 1 and 3, it should be, and in 5, it should be playing, but more slowly than in case 1 and 3. I was multiplying the animation speed by the velocity, but then I realized it wouldn't work in the case of the treadmill

Is this possible with the information I have? If not what other possible information combinations do I need?

The short question is, how do you measure if a single force is changing the velocity of an object given all other forces acting on it and it's current (and perhaps past if I need to record it) velocity, and if so, how much.
 
Last edited:
Physics news on Phys.org
  • #2
I say don't worry about forces. I don't see how they can help your case here. Just worry about velocity. And, perhaps position.

Make a variable for the speed of the ground (or treadmill): G
Make another variable for the speed of the character: V
Make another variable for the speed at which the running animation should play: A=V-G

You might need to make position variables for the wall, the ground, and the character. The position of each will obviously change depending on their speed and time...so you'll need a time variable as well.
The position of the wall can be fixed to a position of the ground.
Make a case that when the position of the character=position of the wall, then V=G

Simple. I should have been a computer programmer :P
 
  • #3
If you do want to use forces, here is how you go about it.

1) Running must apply a constant force in specific direction.
2) There must be friction with the supporting surface. Make sure to take relative velocities into account.
3) Collisions must apply forces. This is a tricky one. Simplest thing is to compute how far object A went into object B and use Hook's Law. However, this will generally cause objects to separate with a bit more velocity than they hit. It's a good idea to also apply friction during collisions. It can solve the above problem, and allow you to make slightly different collisions between different materials.
 
  • #4
Is there a way to get the relative velocity based on the force of the friction it's applying to me?
 
  • #5


As a scientist, there are a few different approaches that could be taken to solve this problem. One approach would be to use the laws of motion and Newton's second law, which states that the net force acting on an object is equal to its mass times its acceleration. In this case, we can use the character's velocity and the forces acting on it to calculate the net force and determine if it is changing the velocity.

In case 1, the character is running and the only force acting on it is the force of friction from the ground. This force is in the opposite direction of the character's motion, so it will cause a deceleration and eventually bring the character to a stop. In case 3, the character is running on a treadmill, so there are two forces acting on it - the force of friction and the force from the treadmill moving in the same direction as the character. These forces will balance each other out, resulting in a constant velocity.

In case 2, the character hits a wall and experiences a sudden change in velocity. This could be calculated by looking at the change in velocity over time and determining the acceleration, which would then allow us to calculate the force that caused the change.

In case 4, the character is running on a treadmill and hits a wall. In this case, the net force acting on the character will change from the force of friction and the treadmill to just the force of the wall, resulting in a sudden deceleration.

In case 5, the character is running on a treadmill but not fast enough to keep up with the treadmill's speed. In this case, the net force acting on the character will be in the same direction as the character's motion, resulting in an acceleration and an increase in velocity.

Overall, to determine if a single force is changing the velocity of an object, we need to consider all other forces acting on the object and use the laws of motion to calculate the net force and resulting acceleration. By doing this, we can determine the effect of the individual force and how it is changing the object's velocity.

In terms of determining the speed at which the running animation should be played, it may be helpful to also consider the character's mass and the forces acting on it in addition to its velocity. This would allow for a more accurate calculation and adjustment of the animation speed based on the net force and resulting acceleration. Additionally, recording past velocity data could also be helpful in predicting and adjusting the animation
 

1. How do you determine if a force is making a difference?

The most basic way to determine if a force is making a difference is by using Newton's Second Law of Motion, which states that the net force acting on an object is equal to the mass of the object multiplied by its acceleration. By measuring the object's mass and acceleration, you can calculate the net force and determine if it is making a difference in the object's motion.

2. What factors affect the impact of a force?

Several factors can affect the impact of a force, including the magnitude of the force, the direction in which it is applied, the mass of the object on which it is acting, and the surface or medium in which the force is applied. These factors can all change the resulting acceleration of the object and determine if the force is making a difference.

3. Can multiple forces act on an object at the same time?

Yes, multiple forces can act on an object simultaneously. In fact, it is common for an object to experience multiple forces at once, such as the force of gravity and the force of friction. In these cases, the net force on the object is the sum of all the individual forces acting on it.

4. How do you measure the force exerted by an object?

The most common unit of measurement for force is the Newton (N). A spring scale or a force meter can be used to measure the force exerted by an object. These instruments work by stretching a spring or a rubber band and measuring the amount of force required to stretch them.

5. What is the difference between a balanced and an unbalanced force?

A balanced force is a force or combination of forces that result in a net force of zero on an object. This means that the object's motion will not change. An unbalanced force, on the other hand, is a force or combination of forces that result in a net force greater than zero, causing the object to accelerate or change its motion.

Similar threads

  • Classical Physics
Replies
17
Views
1K
  • Classical Physics
Replies
7
Views
746
Replies
7
Views
696
Replies
32
Views
1K
  • Classical Physics
2
Replies
41
Views
2K
Replies
10
Views
898
  • Classical Physics
2
Replies
40
Views
4K
Replies
21
Views
963
Replies
18
Views
938
Back
Top