Projectile Motion: Finding Angle and Displacement in x Seconds

Click For Summary
SUMMARY

The discussion focuses on calculating the angle and displacement of a projectile in a physics engine after a specified time increment, rather than the total flight time. The formula y = ut + 1/2gt^2 is highlighted as a standard method for calculating vertical displacement, but the user seeks an alternative approach to avoid memory allocation issues with long-term flight simulations. The suggestion is to update the projectile's position and velocity separately using small time increments, ensuring accurate results without exceeding memory limits.

PREREQUISITES
  • Understanding of projectile motion principles
  • Familiarity with kinematic equations, specifically y = ut + 1/2gt^2
  • Basic knowledge of trigonometry, particularly the use of the atan function
  • Experience with physics engines and their performance constraints
NEXT STEPS
  • Research the implementation of incremental updates in physics engines
  • Learn about optimizing memory usage in long-term simulations
  • Study the derivation and application of kinematic equations in game development
  • Explore the use of velocity components in projectile motion calculations
USEFUL FOR

Game developers, physics engine programmers, and anyone involved in simulating projectile motion in real-time applications.

Seppy
Messages
1
Reaction score
0
I need to find the angle of a projectile after traveling x seconds of flight.
I know the position of the projectile, the x seconds and the velocity.

or

I need to find the displacement of a projectile after a set increment time rather than the standard, total time used in the

y=ut+1/2gt^2

This is for a physics engine, instead of keeping a constant clock of projectiles i need to update the projectiles position every x seconds. This is because for longterm flight projectiles the clock would exceed memory allocation.

What I've tryed to do is use

theta = atan(u + at)

But it gets weird results.
 
Last edited:
Physics news on Phys.org
You might find it easier to just keep track of position and velocity separately, then, as most engines do. Simply update the y-velocity by a*time_increment, and then update y and x by corresponding velocity * time_increment. If your time increments are small enough, result should be the same.

Or are you restricted to large time increments for some reason?
 
I have no idea why computing y = ut + 1/2gt^2 for a lot of succesive values of t would exceed memory allocation.

theta = atan(u + at) would give the angle of the velocity of the projectile with the x axis, IF the x component of the velocity was equal to 1. I don't really see what good this angle would do to find a new x and y, if you already know v_x and v_y.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
40
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 8 ·
Replies
8
Views
9K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 10 ·
Replies
10
Views
20K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K