Troubleshooting a Simulation: Acceleration & Velocity Lost in a Jump

In summary, the conversation discusses the need for a formula to calculate acceleration in a simulation, using variables such as frames till full speed, full speed, frames, and actual speed. The goal is to model acceleration so that the player gradually reaches full speed instead of starting at it immediately. The conversation also touches on the estimation of velocity lost in a jump and suggests using cartoon physics to exaggerate values. Some equations are provided for calculating acceleration and simulating jump behavior.
  • #1
cubby208
6
0
Hello! I have been trying to make a simulation and it doesn't quite work right, don't exactly know why. I have two questions!

1. Acceleration
I have been trying

I need a formula that uses.
frames till full speed (f) (if framerate is 60fps and this value is 60 then player is at full speed after 1 second this is probably in essence really drag )
Full speed (s) (stores the maximum speed in distance per second)
Frames (t) (stores how many frames the player has been trying to run for)

If their are more variables that are needed feel free to use them.

And comes out with
Actually speed (as) (which is the speed the player should move considering acceleration this value will get added to player position each frame)

I suppose I am really trying to model acceleration which is like

a = (velocity change)/(time) however doing that doesn't seem to get the right effect.

My goal is that when the player moves it is not full speed from the start, instead it accelerates up to full speed. This is so if you want to for example jump across a long distance you need to get a running start.2. Velocity lost in a jump
So when a human jumps about how much x, y, and z is lost (I realize it is impossible to find an exact number... I just need an estimate for a simulation). Basically when the player jumps I am going to divide x y and z velocity by a number, but I don't know which one.

I suppose in both of these situations I am really asking for cartoon physics so I might be necessary to exaggerate some values.
 
Physics news on Phys.org
  • #2
Speed is Acceleration*Time if acceleration is constant. However, your acceleration might not be constant. If you want to use this, then your acceleration should be
A= (s)/(f) for 0<(t)<(f), A = 0 when (t) >=(f)
(as) = A*(t) for 0<(t)<(f), (as) =(s) when (t) >=(f).
If the person is accelerating from a medium speed (ps), then I would reset the relative time to (t) = (ps)/A.

For the second part, one simple way would be to transfer the speed directly into the jump.
if you start with [x,y,0] and jump angle is b, then the speeds after the jump would be [xcosb,ycosb, sqrt(x^2+y^2)sinb], with the z component needing to lose speed due to gravity.
 
  • #3
To simulate system behaviour by forces law and initial conditions only, just take a look.
 

FAQ: Troubleshooting a Simulation: Acceleration & Velocity Lost in a Jump

1. How do I know if my simulation is experiencing acceleration or velocity loss during a jump?

The easiest way to determine if your simulation is experiencing acceleration or velocity loss is to track the movement of the object during the jump. If the object's velocity decreases over time, it is experiencing velocity loss. If the object's acceleration decreases over time, it is experiencing acceleration loss.

2. What are some common causes of acceleration and velocity loss in a simulation?

There are several potential causes of acceleration and velocity loss in a simulation, including incorrect physics settings, collision issues, and programming errors. It is important to carefully review all aspects of the simulation to identify the root cause of the issue.

3. How can I troubleshoot acceleration and velocity loss in my simulation?

To troubleshoot acceleration and velocity loss, start by checking the physics settings and ensuring that they are accurately representing the laws of physics. Next, check for any coding errors or collisions that could be affecting the simulation. You may also want to test the simulation with different settings to see if the issue persists.

4. Can environmental factors affect acceleration and velocity in a simulation?

Yes, environmental factors such as gravity and air resistance can greatly impact acceleration and velocity in a simulation. It is important to accurately represent these factors in order to create a realistic simulation.

5. How can I improve the accuracy of acceleration and velocity in my simulation?

To improve the accuracy of acceleration and velocity in your simulation, make sure to carefully consider all environmental factors and accurately represent them in the simulation. Additionally, regularly testing and adjusting the simulation's physics settings can help to improve its accuracy over time.

Similar threads

Replies
11
Views
2K
Replies
17
Views
1K
Replies
4
Views
1K
Replies
14
Views
2K
Replies
7
Views
1K
Back
Top