Jumping over objects while in motion

  • Thread starter kool_j
  • Start date
  • Tags
    Motion
In summary, to make a character jump over a stationary object, you need to keep its x and y velocities independent. You can do this by setting yVel to a positive value at the start of the jump and then adjusting it as time progresses.
  • #1
kool_j
1
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
  • #2
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 [itex]y(t)=y_0t-\frac{1}{2}gt^2[/itex].

For your game I think you'll have to tweak [itex]y_0[/itex] and g.
A higher y0 means a more powerful jump.
A higher g means a stronger gravitational field.
 
  • #3
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:
 

FAQ: Jumping over objects while in motion

How does jumping over objects while in motion affect the body?

Jumping over objects while in motion can put a lot of strain on the body, especially on the lower body. It requires a lot of explosive power and coordination, which can lead to muscle soreness and potential injuries if not done properly.

What is the best technique for jumping over objects while in motion?

The best technique for jumping over objects while in motion is to approach the object with a steady running pace, and right before reaching the object, bend your knees and explode upwards, lifting your body over the object. It is important to also use your arms for momentum and balance.

Are there any risks involved in jumping over objects while in motion?

Yes, there are some risks involved in jumping over objects while in motion. As mentioned before, it can put strain on the body and lead to injuries if not done properly. It is important to start with smaller objects and gradually increase the difficulty to avoid potential risks.

What are the benefits of jumping over objects while in motion?

Jumping over objects while in motion is a great way to improve your explosive power, agility, and coordination. It also helps to build strength in your leg muscles and core. It is also a fun and challenging way to incorporate cardiovascular exercise into your routine.

Can anyone learn how to jump over objects while in motion?

Yes, anyone can learn how to jump over objects while in motion. It requires practice and proper technique, but with dedication and consistency, anyone can improve their jumping skills. It is important to listen to your body and start with smaller objects before progressing to more challenging ones.

Back
Top