Jumping over objects while in motion

  • Thread starter Thread starter kool_j
  • Start date Start date
  • Tags Tags
    Motion
AI Thread Summary
To create a jumping mechanic in a PC game where an object (object A) jumps over a stationary object (object B), a parabolic motion model can be applied. The x-component of the velocity remains constant, while the y-component is influenced by the initial jump velocity (y0) and gravity (g). The formula y(t) = y0t - (1/2)gt² can be used to calculate the jump's height and duration. Adjusting y0 will increase jump height, while modifying g will affect gravitational pull. This approach allows for a realistic jumping arc in platformer-style games.
kool_j
Messages
1
Reaction score
0
Hi,
I'm in the process of designing a PC game and I need to make objectA ,which is driving along to jump over object B which is stationary in its path. Can anyone tell if there is a formula to work out this type of motion.
Thanks :cry:
 
Physics news on Phys.org
A simplistic way to do it would be to assume the jumper is like rigid body and follows a parabolic path while in the air. Let's call the direction in which the jumper is running the x-direction and up will be the y-direction.
Then when jumping, the x-component of the velocity will not change.
For the y-direction, you'll have to know how high he/she will jump, which is determined by it's initial velocity in the y-direction. Let's call it y0.
Then y(t)=y_0t-\frac{1}{2}gt^2.

For your game I think you'll have to tweak y_0 and g.
A higher y0 means a more powerful jump.
A higher g means a stronger gravitational field.
 
I assume youre looking at the object that's jumping from side on right?
(Like a Platformer) I also assume that you must be keeping its x, y
velocities independent from each other.

y

|
|
|
|________ x

If that's the case, keep your x-velocity constant as the jump is made.
To start with, set the y-vel to some positive value.
(yVel = startYVal)
(This will set how high you want to jump)
As time passes, change your y-velocity as follows:
yVel = oldYVel - g*t**2,
(where t is time and g is some constant that will set your gravity)
When yVel == - startYVal, then set yVal to 0 and end your loop.
(Otherwise your character will just fall straight through the platform)

This should give you a nice parabollic shape for your jump.

Sorry... I couldn't think of any simpler terms to explain this in.
Enjoy making the game! :biggrin:
 
The rope is tied into the person (the load of 200 pounds) and the rope goes up from the person to a fixed pulley and back down to his hands. He hauls the rope to suspend himself in the air. What is the mechanical advantage of the system? The person will indeed only have to lift half of his body weight (roughly 100 pounds) because he now lessened the load by that same amount. This APPEARS to be a 2:1 because he can hold himself with half the force, but my question is: is that mechanical...
Some physics textbook writer told me that Newton's first law applies only on bodies that feel no interactions at all. He said that if a body is on rest or moves in constant velocity, there is no external force acting on it. But I have heard another form of the law that says the net force acting on a body must be zero. This means there is interactions involved after all. So which one is correct?
Thread 'Beam on an inclined plane'
Hello! I have a question regarding a beam on an inclined plane. I was considering a beam resting on two supports attached to an inclined plane. I was almost sure that the lower support must be more loaded. My imagination about this problem is shown in the picture below. Here is how I wrote the condition of equilibrium forces: $$ \begin{cases} F_{g\parallel}=F_{t1}+F_{t2}, \\ F_{g\perp}=F_{r1}+F_{r2} \end{cases}. $$ On the other hand...
Back
Top