- #1
orcishhorde
- 3
- 0
Hello folks, I need some physics help.
Some background to get us on the same rails :)
I am developing a 2D game in my spare time. Player controls an object (aka spaceship) in open space (no gravitation influence) by selecting a point in space. A constant force which is always pointed at the chosen point is applied to the object. You may read it like this: spaceship's engine with variable thrust vector constantly gives its maximum thrust towards the chosen point.
Object's mass never changes and stays the same.
I want to draw a predicted trajectory based on object's current velocity and a chosen point in space. To do that I need to calculate object's position in the future. For example, 10 discreet values - position after 1 second, after 2, 3, ..., 10. It will be enough to draw the line.
Observable object's behaviour:
If velocity is > 0 when a point is chosen, object starts orbiting around that point with elliptic orbit. Cool ^^. I just have no clue how to accurately "predict" that motion.
I revisited kinematic formulas (hello, school), recalled how vectors work (hello again, school) but it seems that this motion is somewhat more complex... I've even looked through some astrodynamics articles on wikipedia but formulas there are for gravitational forces and I can't get my head around them anyway :/
Some background to get us on the same rails :)
I am developing a 2D game in my spare time. Player controls an object (aka spaceship) in open space (no gravitation influence) by selecting a point in space. A constant force which is always pointed at the chosen point is applied to the object. You may read it like this: spaceship's engine with variable thrust vector constantly gives its maximum thrust towards the chosen point.
Object's mass never changes and stays the same.
I want to draw a predicted trajectory based on object's current velocity and a chosen point in space. To do that I need to calculate object's position in the future. For example, 10 discreet values - position after 1 second, after 2, 3, ..., 10. It will be enough to draw the line.
Observable object's behaviour:
If velocity is > 0 when a point is chosen, object starts orbiting around that point with elliptic orbit. Cool ^^. I just have no clue how to accurately "predict" that motion.
I revisited kinematic formulas (hello, school), recalled how vectors work (hello again, school) but it seems that this motion is somewhat more complex... I've even looked through some astrodynamics articles on wikipedia but formulas there are for gravitational forces and I can't get my head around them anyway :/